⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

research-material-scout

huangruiteng@huangruiteng⭐ 4.0k stars· last commit 3d ago· 3 open issues

Use when the user asks Codex to research, find learning materials, process "素材:" links, "请你读" / "精读" a material, build a material radar, or use multi-source information retrieval for career learning and Agent infra tracking. Do not use the career/Agent-infra routing bias for user-directed `整理笔记` into a named note.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐⭐⭐ 4.0k on GitHubGitHub ↗

Very popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

曾登 GitHub Trending #1

我的自学笔记,终身更新。

从 C++、算法和操作系统,到分布式系统、MLSys、大模型与 Agent 工程。这里记录我的学习路径、课程实验和实践心得。

核心专栏速览 · 笔记目录 · 学习材料 · 待读队列 · 笔记管理 · 关于本仓库


核心专栏速览

仓库目前包含 60+ 篇主题笔记,以下为近期高频更新、篇幅最重的四个核心板块:

领域板块核心代表笔记主要覆盖内容
Agent 工程与长程架构AI-Agent-Engineering · AI-Agent-Product&PE · Codex-SubagentAgent Harness、长程控制面(LoopX)、上下文交付、经验记忆(OpenViking)、子智能体通信与恢复、评测与自演进(RSI)
大模型系统与 AI InfraLLM-MLSys · MLSys+RecSys · GPU训练/推理成本建模、KV Cache、Continuous Batching、FlashAttention、CUDA/Triton 算子、分布式并行、MoE 与大规模搜广推引擎优化
AI 算法与搜广推学习AI-Applied-Algorithms · AI-Algorithms · 深度学习推荐系统 · Reinforcement-Learning预训练与后训练对齐(RLHF/GRPO)、多模态与生成模型、LLM 增强检索、召回与多目标排序、计算广告与因果实验归因
系统底座与现代语言Distributed-Systems · Database · 操作系统 · muduo · C++ · Rust · TypeScript操作系统内核与并发、计算机网络(Stanford CS144)、分布式一致性与事务、数据库存储引擎、Profiling 与现代系统级编程语言

笔记目录

笔记按主题分层,文件都在 Notes/ 下(同名子目录存放该笔记的图片与资源)。

笔记心得

当前公开学习材料见 Learning-Materials:Top30 与 ranked backlog、其余候选,以及数据库与分布式系统补课讲义。

笔记与素材的管理代码、规则和测试集中在 note-system,与学习内容分开维护。

仓库助手指令:sync笔记负责拉取、保留本地新增、三方对账与公开提交;sync笔记,仅检查 只生成同步计划。

  • 用「子标题」清晰表达结构
  • 在「子标题」压缩信息:提炼正文内容

关于本仓库

  • This repository uses Github as image host, for the simplicity and reliability of backup.
  • 顶层目录中,Notes/ 放长期笔记,snippets/ 放可复用脚本与代码片段,prompts/ 放可复用 prompt 资产,Resources/ 放论文/讲义 PDF 与长图资源。
  • 本仓库内容由自制笔记转化器自动生成
    • remaining bug: 包含$的行会视为latex行内公式转化为公式图片,但这样会将shell代码转换,需要判断是否在latex代码域内,予以排除
    • solution: clone仓库,用Typora阅读Note文件夹里的本体文件
  • 内推字节AML团队,请联系 [email protected]

2021年版Intro

  • 我的自学笔记,在学习MLSys和C++,整理算法、操作系统,后续学习分布式系统,终身更新。
  • 我不是贵系oi出身的大神,目前在以一个初学者的心态补习计算机知识,学习路径和心得可能更值得大家借鉴。

2025年版Intro

  • 笔记的 AI 自动化管理,参考 .trae/documents 文件夹中的内容
  • 多了太多内容,无从谈起,建议看目录。

相关项目与社交媒体

  • 姊妹开源项目:LoopX — 面向长程 Agent 与 Agent 团队的语义控制面(Semantic Control Plane,曾登 GitHub Trending #1)
  • 小红书: 观想人间的一团云(与 X @huangruiteng 合计万余关注;早期记录:3-4k粉丝)
  • 知乎咨询

Star History

Star History Chart

// HOW IT'S BUILT

// FILES

5 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • .codex/skills/research-material-scout/SKILL.md28 KB5b3e64d06cbeupstream ↗
    ---
    name: research-material-scout
    description: Research and triage learning materials; read and explain sources for "请你读" / "精读"; process "素材:" intakes and "读完" closure. Explicit reading follows the source's argument, not career or project ranking.
    ---
    
    # Research Material Scout
    
    ## Choose the mode first
    
    - `请你读 / 精读 / 帮我读一下`: read [the reading protocol](references/paper-reading-protocol.md) before source work. It owns source coverage, explanation, figures and delivery checks for articles, papers, chapters, repos and bundles. Use the source routes below as needed; skip discovery ranking and intake workflows. Explain the author's argument before project applications. Do not edit notes, indexes or lifecycle/ranking; cache only reading artifacts.
    - `素材 / 调研 / 继续调研`: follow discovery, source verification and managed intake below. Decision Context guides what to select, not what an explicitly requested reading may omit.
    - `整理笔记 / 读完`: follow repository note-integration rules and detail preservation below; only user-backed completion authorizes archiving.
    
    ## Discovery Mission
    
    Build a high-signal learning and career material pipeline for the user.
    
    Use the user's current, explicitly confirmed Decision Context to select the next learning action. Read its current version and distinguish user facts, source evidence, and assistant proposals. Career themes are defaults, not permanent weights: new responsibilities, a decision deadline, or a completed reading can change the order. Keep private context out of public queries and skill text.
    
    Before recommending a first read, check existing Notes, managed material records, and the user's latest read-completion statements. Material importance and remaining reading effort are separate: a central paper already understood may need only one missing experiment, a design delta, or a later revisit. Do not invent a completed/archive transition; use the active lifecycle contract and an explicit disposition.
    
    For user-directed note integration, the named target and source's primary domain take precedence over career mapping. Common discovery lanes include agent runtime/evaluation/memory, model learning, serving and RL systems, product workflows, and career signals; select among them from the current task rather than a fixed percentage split.
    
    For decision-driven X discovery or benchmark reading recommendations, read [the focused scout protocol](references/decision-driven-scouting.md).
    
    ## Boundary With LoopX Material
    
    This skill is the CS-Notes source-discovery and exact-reading adapter. It owns
    source recall, primary-source verification, reader maps, domain scoring, and
    the CS-Notes public/private landing decision.
    
    When the connected project or goal explicitly activates Material Lifecycle, use the
    project-local managed `loopx-material` skill for generic store inventory, candidate/archive
    transitions, lossless migration, ranked-entry rebuild, bounded rerank,
    owner-gated apply, rollback, and audit. Pass exact-read evidence and the
    project-specific score into that workflow; do not duplicate or weaken its
    authority and losslessness gates here.
    
    For CS-Notes, a managed authority pointer under
    `.local/material-lifecycle/authority/current.json` means the old candidate and
    archive Markdown files are immutable legacy content backing. Never append a
    candidate, archive an item, or edit the old Top30 in those files. Use the
    project-local `loopx-material` workflow and the private managed intake adapter.
    An explicit `素材:` request authorizes candidate intake, a ranking
    settlement, and reviewed public-field export for verified public sources
    in the same user workflow. Keep intake and ranking as separate
    receipts and, when ranking changes, separate authority revisions so CAS,
    preview, rollback, and audit remain independent.
    
    For verified public sources, finish version-bound field review and public queue
    prepare/apply/check in that workflow; do not wait for another request to publish
    the local queue. Keep original content, private annotations and audit evidence
    local. Internal or uncertain sources remain private. A public-looking domain
    alone is insufficient evidence, and public export never bypasses digest or
    owner-gate checks.
    
    Before recommending a first read or refreshing after Git pull, reconcile explicit
    owner read-completion evidence and verified remotely merged completion records
    with the managed authority. Archive completed material through the source owner;
    retain original sources/backing. If retained as a read reference, label the revisit
    purpose and keep it in backlog. Assistant `read_scope` is not owner completion.
    
    Every intake must end with one explicit disposition: `top_window`,
    `ranked_backlog`, or `no_change`. Determine high value from exact-read evidence,
    S/A/B tier, current Decision Context, overlap, and artifact convertibility rather
    than tier alone. A high-value material must gain verified ranked membership in
    the Top30 or ranked backlog; it may not remain only an unranked candidate.
    `no_change` requires a reason and is reserved for lower-value or substantially
    duplicative material. If the Top30 is full, move displaced entries into the
    ranked backlog without loss. Do not move protected anchors without a changed
    Decision Context or explicit owner instruction. When auditing or reshaping the
    Top30 against active deliverables, stratify by horizon wave and reading effort
    (`note-system/materials/material_wave_ranking.py`), verify load-bearing primary
    citations are settled ahead of secondary commentary, and keep orthogonal trend
    items in `ranked_backlog` rather than crowding active decision waves.
    
    The installed project skill does not itself activate Material Lifecycle.
    Without an active project- or goal-scoped profile, declared source authority, and current native owner authorization, this skill may research or read material but must not rewrite the managed store. An already authorized ordinary project source does not require a new Goal or a borrowed agent identity.
    
    ## Source Strategy
    
    Prefer primary sources for technical conclusions:
    
    - Papers: arXiv, conference pages, official PDFs.
    - Code: GitHub repositories, README, issues, releases.
    - Products: official docs, release notes, engineering blogs.
    - Internal/user links: Lark/ByteTech only when accessible through user-provided context or approved local tools.
    
    Use social media, 微信公众号, 小红书, X/Twitter, 微博, and aggregators as discovery signals, not final truth.
    
    When extracting mechanisms from a repo, quickstart, prompt, or code file, include file-level links in the user-facing answer and persisted notes/archive. For GitHub sources, prefer commit-pinned permalinks and record the commit read; avoid writing only a repo name or bare filename when a concrete source file drove the claim.
    
    Choose currently callable tools by the question and source type:
    
    - Use web search for broad recall, alternate terminology, and recent developments.
    - Use platform search or authenticated source readers for social opinions and author posts; inspect the original posts and links.
    - Use paper lanes, GitHub, official docs, release notes, and engineering blogs for technical evidence.
    - Use existing local readers for specific URLs, RSS, or transcripts when they add coverage.
    
    Codex remains responsible for verification, ranking, summarization, and local persistence. No specific aggregator is a prerequisite. A publicly listed skill or downloadable client does not establish that its backend is publicly usable; verify service access and dependencies before adopting one. Continue through available sources when an optional tool is absent, and report only coverage gaps that affect the answer.
    
    ### Implementation-First Catalogs
    
    For Agent Harness / agent infra exploration, use implementation-first catalogs as a source-discovery layer before broad web search when available.
    
    Current primary catalog:
    
    - `Agent Harness Engineering implementation-first catalog`: `https://github.com/Picrew/awesome-agent-harness`
    
    Use it as an index, not as evidence by itself:
    
    1. Pick the relevant ETCLOVG layer first: execution, tooling, context, lifecycle, observability, verification, or governance.
    2. Inspect the candidate repo's README, docs, releases, issues, or paper before ranking it.
    3. Prefer implementation entries that can change the user's artifacts: sandbox boundary, tool registry/schema, state/context contract, handoff/workflow loop, trace/eval schema, policy/audit layer.
    4. Do not dump many frameworks into Top30. Promote only high-signal projects through the current managed candidate authority, with read status and concrete artifact deltas.
    5. Treat stars and catalog summaries as recall/ranking hints, not truth.
    
    ### arXiv / Paper Reading Route
    
    For arXiv papers, do not jump straight to PDF extraction unless HTML is unavailable.
    
    Resolution order:
    
    1. Normalize the paper id and version from any of these forms:
       - `https://arxiv.org/abs/<id>`
       - `https://arxiv.org/pdf/<id>`
       - `https://arxiv.org/html/<id>vN`
       - bare title + discovered arXiv id.
    2. Try arXiv HTML first:
       - if a version is known, open `https://arxiv.org/html/<id>vN`;
       - if only bare id is known, inspect the abs page for the current version, then try `https://arxiv.org/html/<id>v<version>`;
       - also try `https://arxiv.org/html/<id>` if versioned HTML is not obvious.
    3. Use the abs page for metadata, title, authors, abstract, version history, and links.
    4. For `精读`, method-heavy papers, or cases where HTML lacks needed appendix, math, algorithm, prompt, or caption detail, try the arXiv TeX source before PDF fallback:
       - download `https://arxiv.org/src/<id>` into `.local/paper-cache/<id>-src.tar.gz`;
       - unpack into `.local/paper-cache/<id>-src/`;
       - locate the entry `.tex` file, usually `main.tex` or the file containing `\documentclass`;
       - recursively inspect included `.tex`, `.bib`, figure captions, tables, algorithm blocks, appendices, and prompt/templates.
    5. Fall back to PDF only when HTML/source is missing, blocked, malformed, or lacks the needed figures/tables.
    6. If using PDF fallback, extract text into `.local/paper-cache/` and explicitly say that the read path was PDF fallback.
    
    Why this matters:
    
    - arXiv HTML preserves section anchors, table/figure order, equation context, and is easier for user-side parallel reading.
    - arXiv TeX source often preserves appendices, captions, algorithms, prompts, and bibliography context better than PDF text extraction.
    - PDF extraction can lose figures, captions, math, and table structure; it is acceptable for quick scanning but weaker for `请你读` / `精读`.
    - For `请你读` / `精读`, always provide the user-facing HTML link when it exists, even if Codex also used the PDF for extraction.
    
    ### Paper Radar Pattern
    
    For recurring or paper-heavy exploration, use `daily-paper-reader` as a design reference, not as a dependency to install. Its useful increment is the pipeline shape: intent profiles -> multi-lane recall -> fusion/rerank -> evidence scoring -> deep/quick/carryover selection.
    
    Adopt these patterns:
    
    1. Convert the user's current goal into 1-3 intent profiles. Each profile should have:
       - a short tag,
       - 3-6 atomic English keywords for exact/BM25-style recall,
       - 1-4 semantic intent queries for embedding/web search,
       - an explicit source lane such as arXiv, OpenReview, conference proceedings, domain preprint servers, GitHub, official docs, social, or implementation catalog.
    2. Run more than one lane when possible. Combine exact keywords, semantic queries, and source-specific searches instead of relying on one giant query.
       - For AI / agent infra paper search, treat `arXiv`, `OpenReview`, and major venue lanes (`NeurIPS`, `ICLR`, `ICML`, `ACL`, `EMNLP`, `AAAI`) as high-value paper sources.
       - For cross-domain or bio/chem/medical-adjacent topics, optionally add `bioRxiv`, `medRxiv`, and `ChemRxiv` as separate lanes.
       - Do not sweep every source by default. Pick lanes that match the topic, then record which lane found each candidate.
    3. Fuse and rank qualitatively:
       - keep at least one strong result from each active lane before global ranking,
       - prefer candidates hit by multiple lanes,
       - require an evidence sentence for every S/A candidate.
    4. Split results into `deep`, `quick`, `background`, and `carryover`:
       - `deep`: user should personally read or Codex should deep-read next;
       - `quick`: Codex summary is enough now;
       - `background`: useful but not active;
       - `carryover`: high-signal but not yet processed, keep it visible for the next exploration pass instead of letting daily freshness bury it.
    5. For papers where figures/tables are central, inspect HTML, TeX, PDF figures, tables, or repo assets before ranking when feasible.
    
    Do not copy these parts by default: GitHub Actions / Pages deployment, Supabase schema, remote public embedding/rerank services, front-end panels, API keys, or the exact prompt text. Keep the local skill lightweight and source-agnostic.
    
    ### Multi-Source Paper Exploration Mesh
    
    For paper-heavy exploration, absorb `daily-paper-reader`'s paper data-source coverage rather than its hosted search/deployment stack. The key improvement is to search several paper-source lanes in parallel and then merge them with Codex's existing source stack.
    
    Default paper lanes:
    
    - `arXiv`: fast preprint and recent-paper recall.
    - `OpenReview`: ICLR / NeurIPS / ICML / AAAI submissions, public reviews, decisions, and withdrawn-public papers when visible.
    - Venue lanes: `NeurIPS`, `ICLR`, `ICML`, `ACL`, `EMNLP`, `AAAI`; use official venue pages, OpenReview, ACL Anthology, AAAI/OJS, proceedings pages, or targeted web search as appropriate.
    - Domain preprint lanes: `bioRxiv`, `medRxiv`, `ChemRxiv`; use only when the topic is bio / medical / chemistry / scientific-agent adjacent.
    
    Combine these with non-paper lanes:
    
    - GitHub repos, release notes, project pages, Papers with Code-style project pages when available;
    - official product or framework docs;
    - implementation-first catalogs for agent infra;
    - Social platforms and aggregators as broad recall, never as final fact sources.
    
    Operational rule:
    
    1. For a focused paper search, choose at least 2 relevant paper lanes plus 1 implementation or docs lane when possible.
    2. For a broader paper radar, choose 3-6 lanes and keep per-lane coverage visible.
    3. Do not wait for a local database or hosted search service to exist. Use official source pages, platform APIs, source-specific search, ordinary web search, and available local readers in parallel.
    4. Rank by cross-lane agreement, primary-source quality, code/data availability, and direct artifact impact.
    5. Record which lane found each S/A candidate and which high-value lane was checked but produced no useful hit.
    
    If this skill has `scripts/multi_source_paper_explore.py`, use it as the first-pass paper-source recall helper for paper-heavy tasks:
    
    ```bash
    python3 .codex/skills/research-material-scout/scripts/multi_source_paper_explore.py \
      --query "<topic>" \
      --query "<alternate wording or known title>" \
      --sources arxiv,openreview,openalex,biorxiv,medrxiv,chemrxiv,venue-hints
    ```
    
    Repeat `--query` for intent-query expansion. Narrow `--sources` to topic-fit lanes when domain preprint servers are likely irrelevant.
    
    Use a dual-track exploration flow for real paper-heavy work:
    
    1. Run the script for structured paper-lane recall and per-lane evidence.
    2. In parallel, run Codex's existing web / platform / GitHub / official-doc search for project pages, repos, social/aggregator leads, implementation evidence, and missed terminology.
    3. Merge the two result sets before ranking. Treat script-only hits as candidates to verify, and web-only hits as leads to trace back to primary papers / code / docs.
    
    The script is only a recall layer; it complements rather than replaces the older exploration stack.
    
    ## Authenticated Social Link Reading
    
    Use public metadata when sufficient; for incomplete posts, replies, or signed-in search, read the installed `ego-browser` skill and follow its current TaskSpace and API contract. Do not copy stale browser methods into this skill. Reuse the user's sign-in; inspect visible posts and original links, and close only task-owned surfaces.
    
    Capture relevant author, date, post URL, primary-source links, read scope, and the claim to verify. Avoid unrelated recommendations, DMs, account statistics, or a bulk feed dump. Inspect needed images through supported browser/media tools; do not download remote media to work around display restrictions. Store private evidence under `.local/`. A social post can be a first-party statement of its author's claim, but reported experimental results still require the paper, code, or data protocol.
    
    ## Agent-Reach Complement
    
    Agent-Reach (`https://github.com/Panniantong/Agent-Reach`) is an optional local scaffolding layer for source-level coverage. Check its installed capabilities before relying on it.
    
    Use it as a design reference or optional install, not the default primary source.
    
    What it adds:
    
    - source-level tools rather than platform-side aggregation,
    - web reading through Jina Reader,
    - YouTube / Bilibili transcript extraction through `yt-dlp`,
    - GitHub through `gh`,
    - RSS through `feedparser`,
    - Reddit / Twitter / 小红书 / 抖音 / LinkedIn via separate upstream CLIs or MCP tools,
    - `agent-reach doctor` style capability diagnostics.
    
    Use it when an installed reader adds needed coverage for a specific URL, video, repo, or thread, or when search results are too summarized to verify. Prefer an existing native reader when it already covers the source.
    
    Do not install Agent-Reach automatically unless the user asks. It may install many dependencies and configure cookies/proxies. If installed, keep secrets/cookies local and never commit them.
    
    ## Intake Workflow
    
    Directive convention:
    
    - `素材:<link/text>` means intake. Read, classify, summarize, preserve the original link, and append one managed candidate through exact-read evidence, immutable content backing, authority CAS, readback, and receipt.
    - `调研:<question/topic>` means active research. Use broad recall plus source verification, then write high-signal candidates and recommendations.
    - `整理笔记:<link/text>` or "整理笔记 + named note/theme" means direct note integration. The output surface is `Notes/`, not the candidate library by default. Named target and source-domain taxonomy win over career priority.
    - `请你读 / 精读`: use the reading-only route at the top; do not run intake.
    - `读完:<material id/link/title + user notes>` means close the reading loop. Update the best `Notes/` landing before archiving unless the content is private-only. Treat user-highlighted points as retention requirements: concrete prompts, env flags, schema fields, tool/API names, figures/tables, failure cases, doubts, and comparison phrases should be preserved in the public note when safe and conceptually useful; `.local` may keep raw/private/full detail, but must not be the only landing for points the user explicitly asked to remember.
    - `继续调研` means continue the latest active-research theme, but only if adding new sources or a new decision-relevant synthesis.
    
    For each user-provided material:
    
    0. Classify the request intent before choosing tools or files:
       - `整理笔记`: use the repository note-integration workflow. If the user named a file/section, inspect that target first; if not, classify the source's primary contribution such as model algorithm, training method, inference system, agent runtime, product strategy, or career signal, then find the matching note. Do not default to Agent infra just because the material is AI-related.
       - `素材`: intake to the current managed material authority. Do not write the legacy candidate Markdown.
       - `调研`: prioritize by the user's current confirmed Decision Context.
       - `请你读 / 精读`: use the reading protocol, not the intake steps below.
    
    ### User-Highlighted Detail Preservation
    
    When the user provides a numbered/bulleted readout, quoted phrase, prompt snippet, schema, env var, failure case, or says "这个值得作为专题section / 概念级别 / 这个点要记", treat it as first-class source material rather than optional color.
    
    The note-writing rules below apply to `整理笔记 / 读完`. During `请你读 / 精读`, cover the user's details in the illustrated conversation answer; do not turn detail preservation into unsolicited note edits.
    
    - Account for every explicit user point before closing the turn: either in `Notes/`, in `.local` with a privacy/version reason, or intentionally skipped with a reason reported to the user.
    - Prefer distilled-but-concrete preservation in `Notes/`: short prompt excerpts or paraphrases, tool names, env flags, schema fields, benchmark names, mode names, key tables/figures, and caveats. Do not over-compress them into only an abstract framework.
    - If a detail is version-sensitive or platform-specific, label it as such and preserve the source/version boundary; do not hide it solely in `.local`.
    - If the user asks for a "专题section" or "概念级别", promote or create an independent section instead of burying the point under a neighboring topic.
    - `.local` is for raw cache, private URLs, full prompt copies, and sensitive/internal detail. It supplements public notes; it is not a substitute for durable `Notes/` synthesis.
    
    1. Preserve the original link in the final note title.
       - If the URL contains disposable login tokens, access tokens, auth codes, session IDs, or other sensitive query parameters, use them only for reading and persist only the stable URL with those parameters stripped. Note that the original link was sanitized.
    2. Try the best reader first:
       - 微信公众号 -> `wechat-article-reader`
       - 小红书 -> `xiaohongshu-reader`
       - 飞书 / Lark -> `lark-doc` / `lark-wiki`
       - arXiv / paper -> arXiv HTML route first, abs metadata second, PDF fallback last
       - GitHub -> GitHub tools or `gh`
       - X/Twitter concrete link -> public oEmbed first, then `ego-browser` authenticated snapshot / DOM extraction if needed
       - Web pages -> official web search / browser / Playwright as needed
    3. If unreadable, mark as `Unread` and ask for pasted text, screenshot, export, or accessible copy.
    4. Classify into S/A/B/Unread:
       - S: user should personally read and convert into an artifact.
       - A: Codex summary is enough unless the theme becomes active.
       - B: useful background, tool lead, or product observation.
       - Unread: not read; never pretend.
    5. If Material Lifecycle is active, write exact-read evidence and staged content, then use the active project source adapter documented in `.local/material-lifecycle/README.md` to intake one candidate or revise its existing stable ref. Verify an intake adds exactly one record, or a revision preserves identity, lifecycle and membership, then create the separate Decision Context-backed ranking revision in the same workflow. Verify the disposition, ranked membership when required, authority readback, readable projection, audit receipt, and rollback path before reporting completion.
    6. For verified public sources, review the public fields against the current authority, body digest and complete record digest; apply and read back the public projection in the same workflow. Check both public and private partitions. Report an unresolved review/export failure instead of treating private intake alone as completion.
    
    ## Active Research Workflow
    
    When proactively finding materials:
    
    1. Start from the user's current goals, not generic trends.
    2. For paper-heavy or recurring themes, draft a small intent-profile plan first: tags, exact keywords, semantic queries, and source lanes. Include arXiv / OpenReview / venue lanes (`NeurIPS`, `ICLR`, `ICML`, `ACL`, `EMNLP`, `AAAI`) when relevant, and add domain preprint lanes (`bioRxiv`, `medRxiv`, `ChemRxiv`) only when the topic warrants them. Then query across at least two source types when possible: paper/code/docs/social.
    3. For paper-heavy tasks, run multiple selected paper-source lanes in parallel where possible, then merge them with code/docs/social/implementation lanes. Do not make a local database or hosted search service a prerequisite for exploration.
    4. Prefer fewer, higher-quality materials over broad dumps. Keep per-lane coverage visible so one popular source does not crowd out a strategically important niche source.
    5. For each candidate, capture:
       - title and original URL,
       - source type and read status,
       - query/profile lane that found it,
       - one-paragraph summary,
       - evidence sentence for the ranking,
       - why it matters to the user's career goal,
       - recommended action.
    6. If a social/aggregator/source-search item points to a paper or repo, follow the paper/repo before ranking.
    7. End with a selection split: S/A/B/Unread plus `deep / quick / background / carryover`; carryover items must have a reason and a next trigger.
    
    ## Self-Verification
    
    For discovery/intake (reading-only checks live in the reading protocol):
    
    1. Verify actual source coverage: which relevant lanes were read, returned no useful results, or could not be accessed. State read scope and unresolved evidence gaps; do not repeatedly probe or report an unconfigured optional service.
    2. Check at least two source types for active research whenever possible, such as paper + repo, official docs + social discussion, or product page + engineering blog.
    3. For every S/A candidate, include:
       - original URL,
       - read status,
       - source type,
       - query/profile lane,
       - evidence sentence,
       - why it matters to the user's current confirmed Decision Context,
       - next action.
    4. Confirm the candidate stable ref exists exactly once in the current managed catalog, the immutable content backing digest verifies, and an intake receipt records CAS/readback success.
    5. For `读完` / note integration, run a user-highlighted point audit: every explicit bullet, numbered item, prompt snippet, schema field, env flag, comparison phrase, or doubt from the user is either present in `Notes/`, present only in `.local` with a privacy/version reason, or intentionally skipped with a reason reported.
    6. If any source could not be read, say so explicitly and ask for paste/screenshot/export only when necessary.
    
    ## Quality Bar
    
    Reject or demote materials that are:
    
    - pure hype without implementation detail,
    - duplicate commentary on already captured material,
    - unrelated to the user's current decision and learning priorities,
    - not traceable to a primary source when factual claims matter.
    
    ## Output Style
    
    For intake and note edits, report concisely what changed, where, and the key judgment. Reading explanations follow the reading protocol; concise status reporting does not set their depth.
    
    When writing into `Notes/`:
    
    - Use Typora-friendly block math for real equations: `$$...$$`.
    - Do not put formulas in ```text code fences; reserve code fences for schemas, field lists, commands, and pseudocode.
    - If a figure from the source or user-provided material is essential to understanding the mechanism, save it into the target note's relative asset folder (for example `Notes/AI-Applied-Algorithms/`) and link it with a relative Markdown path. Prefer primary-source figures when available.
    - For high-value cross-layer case studies, do not create a monolithic material section by default. First extract the general mechanism into the highest-level framework section, then add only small local deltas to existing eval / memory / runtime / tooling sections. Keep the source case as evidence, not as the organizing axis.
    - Preserve user-highlighted concrete details in `Notes/` when safe: prompt snippets, command/env flags, schema fields, API/tool names, mode names, version boundaries, and failure cases. Prefer short excerpts or paraphrases over long raw prompt dumps, and mark version-sensitive/platform-specific details instead of silently dropping them.
    
    For high-value materials, include the next concrete action, such as:
    
    - "精读并产出一页 design delta",
    - "由 Codex 先读论文 PDF 并摘要",
    - "只保留为产品观察",
    - "转成 agent-harness TODO / benchmark idea".
    
  • .codex/skills/research-material-scout/scripts/multi_source_paper_explore.py22 KBca643096583aupstream ↗
    #!/usr/bin/env python3
    """Parallel paper-source exploration for research-material-scout.
    
    This is a recall helper, not a truth source. It searches several public paper
    lanes for the same query, normalizes metadata into one JSON payload, and leaves
    ranking / verification to Codex.
    
    Default lanes:
    - arXiv Atom API
    - OpenReview public notes search API
    - OpenAlex works API
    - bioRxiv / medRxiv metadata APIs with local query filtering
    - ChemRxiv public dashboard dataset mirror with local query filtering
    - venue search hints for conference/proceedings lanes
    
    The script uses only Python standard library modules.
    """
    
    from __future__ import annotations
    
    import argparse
    import bz2
    from concurrent.futures import ThreadPoolExecutor, as_completed
    from dataclasses import asdict, dataclass
    from datetime import datetime, timedelta, timezone
    import html
    import json
    import re
    import time
    from typing import Any, Callable
    from urllib.parse import quote, urlencode
    from urllib.request import Request, urlopen
    import xml.etree.ElementTree as ET
    
    
    DEFAULT_SOURCES = "arxiv,openreview,openalex,biorxiv,medrxiv,chemrxiv,venue-hints"
    CHEMRXIV_DASHBOARD_DATA_URL = (
        "https://raw.githubusercontent.com/chemrxiv-dashboard/"
        "chemrxiv-dashboard.github.io/master/data/allchemrxiv_data.json.bz2"
    )
    USER_AGENT = "CS-Notes research-material-scout multi-source paper explorer"
    STOPWORDS = {
        "a",
        "an",
        "and",
        "are",
        "as",
        "at",
        "be",
        "by",
        "for",
        "from",
        "in",
        "into",
        "is",
        "of",
        "on",
        "or",
        "the",
        "to",
        "with",
    }
    
    
    @dataclass
    class PaperResult:
        source: str
        lane: str
        title: str
        url: str
        query: str = ""
        date: str = ""
        venue: str = ""
        authors: list[str] | None = None
        abstract: str = ""
        evidence: str = ""
        kind: str = "paper"
        raw_id: str = ""
    
    
    def now_utc() -> datetime:
        return datetime.now(timezone.utc)
    
    
    def http_json(url: str, timeout: int) -> Any:
        req = Request(url, headers={"User-Agent": USER_AGENT, "Accept": "application/json"})
        with urlopen(req, timeout=timeout) as resp:
            return json.loads(resp.read().decode("utf-8", errors="replace"))
    
    
    def http_bytes(url: str, timeout: int) -> bytes:
        req = Request(url, headers={"User-Agent": USER_AGENT, "Accept": "*/*"})
        with urlopen(req, timeout=timeout) as resp:
            return resp.read()
    
    
    def clean_text(value: Any, limit: int = 900) -> str:
        text = html.unescape(str(value or ""))
        text = re.sub(r"<[^>]+>", " ", text)
        text = re.sub(r"\s+", " ", text).strip()
        if limit and len(text) > limit:
            return text[: limit - 1].rstrip() + "..."
        return text
    
    
    def tokens(query: str) -> list[str]:
        out: list[str] = []
        seen = set()
        for item in re.findall(r"[A-Za-z][A-Za-z0-9_-]{1,}", query.lower()):
            if item in STOPWORDS or item in seen:
                continue
            seen.add(item)
            out.append(item)
        return out
    
    
    def text_match_score(query_terms: list[str], *fields: str) -> int:
        hay = " ".join(fields).lower()
        return sum(1 for term in query_terms if term in hay)
    
    
    def parse_date(value: Any) -> datetime | None:
        text = str(value or "").strip()
        if not text:
            return None
        if text.endswith("Z"):
            text = text[:-1] + "+00:00"
        if re.fullmatch(r"\d{4}-\d{2}-\d{2}", text):
            text += "T00:00:00+00:00"
        try:
            dt = datetime.fromisoformat(text)
        except Exception:
            return None
        if dt.tzinfo is None:
            dt = dt.replace(tzinfo=timezone.utc)
        return dt.astimezone(timezone.utc)
    
    
    def is_future_date(value: Any) -> bool:
        dt = parse_date(value)
        return bool(dt and dt > now_utc() + timedelta(days=1))
    
    
    def arxiv_query(query: str) -> str:
        terms = tokens(query)[:7]
        if not terms:
            return f'all:"{query}"'
        return " AND ".join(f"all:{term}" for term in terms)
    
    
    def search_arxiv(query: str, limit: int, days: int, timeout: int) -> list[PaperResult]:
        params = urlencode(
            {
                "search_query": arxiv_query(query),
                "start": 0,
                "max_results": max(int(limit), 1),
                "sortBy": "submittedDate",
                "sortOrder": "descending",
            }
        )
        raw = http_bytes(f"https://export.arxiv.org/api/query?{params}", timeout)
        root = ET.fromstring(raw)
        ns = {"atom": "http://www.w3.org/2005/Atom"}
        out: list[PaperResult] = []
        for entry in root.findall("atom:entry", ns):
            title = clean_text(entry.findtext("atom:title", default="", namespaces=ns))
            abstract = clean_text(entry.findtext("atom:summary", default="", namespaces=ns))
            date = clean_text(entry.findtext("atom:published", default="", namespaces=ns), limit=80)
            raw_id = clean_text(entry.findtext("atom:id", default="", namespaces=ns), limit=200)
            authors = [
                clean_text(a.findtext("atom:name", default="", namespaces=ns), limit=120)
                for a in entry.findall("atom:author", ns)
            ]
            authors = [a for a in authors if a]
            url = raw_id
            if is_future_date(date):
                continue
            out.append(
                PaperResult(
                    source="arxiv",
                    lane="arXiv",
                    title=title,
                    url=url,
                    date=date,
                    authors=authors,
                    abstract=abstract,
                    evidence=f"arXiv API match for query terms: {', '.join(tokens(query)[:5])}",
                    raw_id=raw_id,
                )
            )
        return out
    
    
    def content_value(content: dict[str, Any], key: str) -> Any:
        raw = content.get(key)
        if isinstance(raw, dict) and "value" in raw:
            return raw.get("value")
        return raw
    
    
    def normalize_authors(raw: Any) -> list[str]:
        if isinstance(raw, list):
            return [clean_text(x, limit=120) for x in raw if clean_text(x, limit=120)]
        if isinstance(raw, str):
            return [clean_text(x, limit=120) for x in re.split(r"[;,]", raw) if clean_text(x, limit=120)]
        return []
    
    
    def search_openreview(query: str, limit: int, days: int, timeout: int) -> list[PaperResult]:
        params = urlencode(
            {
                "term": query,
                "group": "all",
                "source": "all",
                "content": "all",
                "limit": max(int(limit), 1),
            }
        )
        data = http_json(f"https://api2.openreview.net/notes/search?{params}", timeout)
        out: list[PaperResult] = []
        query_terms = tokens(query)
        min_score = max(1, min(2, len(query_terms)))
        for note in data.get("notes") or []:
            if not isinstance(note, dict):
                continue
            content = note.get("content") if isinstance(note.get("content"), dict) else {}
            title = clean_text(content_value(content, "title"))
            if not title:
                continue
            if title.lower().startswith("review:"):
                continue
            abstract = clean_text(content_value(content, "abstract") or content_value(content, "TLDR"))
            pdf = clean_text(content_value(content, "pdf"), limit=300)
            if not abstract and not pdf:
                continue
            forum = clean_text(note.get("forum") or note.get("id"), limit=120)
            venue = clean_text(content_value(content, "venue") or content_value(content, "venueid"), limit=160)
            score = text_match_score(query_terms, title, abstract, venue)
            if score < min_score:
                continue
            date = ""
            for key in ("pdate", "cdate", "tcdate"):
                value = note.get(key)
                if isinstance(value, (int, float)) and value > 0:
                    date = datetime.fromtimestamp(value / 1000.0, tz=timezone.utc).date().isoformat()
                    break
            out.append(
                PaperResult(
                    source="openreview",
                    lane="OpenReview",
                    title=title,
                    url=f"https://openreview.net/forum?id={forum}" if forum else "https://openreview.net/search",
                    date=date,
                    venue=venue,
                    authors=normalize_authors(content_value(content, "authors")),
                    abstract=abstract,
                    evidence=f"OpenReview public notes search hit with local-filter score {score}/{len(query_terms)}; verify paper/forum page.",
                    raw_id=forum,
                )
            )
        return out
    
    
    def reconstruct_openalex_abstract(index: Any) -> str:
        if not isinstance(index, dict):
            return ""
        pairs: list[tuple[int, str]] = []
        for word, positions in index.items():
            if not isinstance(positions, list):
                continue
            for pos in positions:
                try:
                    pairs.append((int(pos), str(word)))
                except Exception:
                    pass
        pairs.sort()
        return clean_text(" ".join(word for _, word in pairs))
    
    
    def search_openalex(query: str, limit: int, days: int, timeout: int) -> list[PaperResult]:
        params = urlencode(
            {
                "search": query,
                "per-page": max(int(limit), 1),
                "sort": "publication_date:desc",
            }
        )
        data = http_json(f"https://api.openalex.org/works?{params}", timeout)
        out: list[PaperResult] = []
        query_terms = tokens(query)
        min_score = max(1, min(2, len(query_terms)))
        for work in data.get("results") or []:
            if not isinstance(work, dict):
                continue
            title = clean_text(work.get("display_name") or work.get("title"))
            if not title:
                continue
            abstract = reconstruct_openalex_abstract(work.get("abstract_inverted_index"))
            score = text_match_score(query_terms, title, abstract)
            if score < min_score:
                continue
            date = clean_text(work.get("publication_date"), limit=40)
            if is_future_date(date):
                continue
            primary = work.get("primary_location") if isinstance(work.get("primary_location"), dict) else {}
            url = (
                clean_text(primary.get("landing_page_url"), limit=300)
                or clean_text((work.get("ids") or {}).get("doi") if isinstance(work.get("ids"), dict) else "", limit=300)
                or clean_text(work.get("id"), limit=300)
            )
            authorships = work.get("authorships") if isinstance(work.get("authorships"), list) else []
            authors: list[str] = []
            for item in authorships[:10]:
                author = item.get("author") if isinstance(item, dict) and isinstance(item.get("author"), dict) else {}
                name = clean_text(author.get("display_name"), limit=120)
                if name:
                    authors.append(name)
            source = primary.get("source") if isinstance(primary.get("source"), dict) else {}
            out.append(
                PaperResult(
                    source="openalex",
                    lane="OpenAlex",
                    title=title,
                    url=url,
                    date=date,
                    venue=clean_text(source.get("display_name"), limit=160),
                    authors=authors,
                    abstract=abstract,
                    evidence=f"OpenAlex works search hit with local-filter score {score}/{len(query_terms)}; verify against original venue/paper page.",
                    raw_id=clean_text(work.get("id"), limit=180),
                )
            )
        return out
    
    
    def bio_endpoint(server: str, start: datetime, end: datetime, cursor: int) -> str:
        return f"https://api.biorxiv.org/details/{server}/{start.date().isoformat()}/{end.date().isoformat()}/{cursor}"
    
    
    def search_bio_server(server: str, query: str, limit: int, days: int, timeout: int, max_pages: int) -> list[PaperResult]:
        end = now_utc()
        start = end - timedelta(days=max(int(days), 1))
        query_terms = tokens(query)
        min_score = max(1, min(2, len(query_terms)))
        cursor = 0
        page_size = 100
        out: list[PaperResult] = []
        seen: set[str] = set()
        for _ in range(max(int(max_pages), 1)):
            data = http_json(bio_endpoint(server, start, end, cursor), timeout)
            messages = data.get("messages") or []
            if messages and isinstance(messages[0], dict):
                try:
                    page_size = max(int(messages[0].get("count") or page_size), 1)
                except Exception:
                    pass
            collection = data.get("collection") or []
            if not collection:
                break
            for raw in collection:
                if not isinstance(raw, dict):
                    continue
                title = clean_text(raw.get("title"))
                abstract = clean_text(raw.get("abstract"))
                score = text_match_score(query_terms, title, abstract)
                if score < min_score:
                    continue
                doi = clean_text(raw.get("doi"), limit=160)
                version = clean_text(raw.get("version") or "1", limit=20)
                key = f"{doi}:{version}"
                if not doi or key in seen:
                    continue
                seen.add(key)
                date = clean_text(raw.get("date"), limit=40)
                out.append(
                    PaperResult(
                        source=server,
                        lane=server,
                        title=title,
                        url=f"https://www.{server}.org/content/{doi}v{version}",
                        date=date,
                        venue=server,
                        authors=normalize_authors(raw.get("authors")),
                        abstract=abstract,
                        evidence=f"{server} API local-filter hit: {score}/{len(query_terms)} query terms.",
                        raw_id=doi,
                    )
                )
                if len(out) >= limit:
                    return out
            cursor += page_size
        return out
    
    
    def search_biorxiv(query: str, limit: int, days: int, timeout: int, max_pages: int) -> list[PaperResult]:
        return search_bio_server("biorxiv", query, limit, days, timeout, max_pages)
    
    
    def search_medrxiv(query: str, limit: int, days: int, timeout: int, max_pages: int) -> list[PaperResult]:
        return search_bio_server("medrxiv", query, limit, days, timeout, max_pages)
    
    
    def normalize_chemrxiv_authors(raw: Any) -> list[str]:
        if not isinstance(raw, list):
            return []
        out: list[str] = []
        for item in raw:
            if not isinstance(item, dict):
                continue
            name = " ".join(
                part
                for part in (
                    clean_text(item.get("firstName"), limit=80),
                    clean_text(item.get("lastName"), limit=80),
                )
                if part
            )
            if name:
                out.append(name)
        return out
    
    
    def search_chemrxiv(query: str, limit: int, days: int, timeout: int) -> list[PaperResult]:
        raw = http_bytes(CHEMRXIV_DASHBOARD_DATA_URL, timeout)
        payload = json.loads(bz2.decompress(raw))
        if not isinstance(payload, dict):
            return []
        query_terms = tokens(query)
        min_score = max(1, min(2, len(query_terms)))
        cutoff = now_utc() - timedelta(days=max(int(days), 1))
        out: list[PaperResult] = []
        for item in payload.values():
            if not isinstance(item, dict):
                continue
            title = clean_text(item.get("title"))
            abstract = clean_text(item.get("abstract"))
            score = text_match_score(query_terms, title, abstract)
            if score < min_score:
                continue
            date = clean_text(item.get("publishedDate") or item.get("approvedDate"), limit=50)
            dt = parse_date(date)
            if dt and dt < cutoff:
                continue
            item_id = clean_text(item.get("id"), limit=120)
            if not title or not item_id:
                continue
            out.append(
                PaperResult(
                    source="chemrxiv",
                    lane="ChemRxiv",
                    title=title,
                    url=f"https://chemrxiv.org/engage/chemrxiv/article-details/{item_id}",
                    date=date,
                    venue="ChemRxiv",
                    authors=normalize_chemrxiv_authors(item.get("authors")),
                    abstract=abstract,
                    evidence=f"ChemRxiv dashboard dataset local-filter hit: {score}/{len(query_terms)} query terms.",
                    raw_id=item_id,
                )
            )
            if len(out) >= limit:
                break
        return out
    
    
    def venue_hints(query: str, limit: int, days: int, timeout: int) -> list[PaperResult]:
        encoded = quote(query)
        hints = [
            ("OpenReview search", f"https://openreview.net/search?term={encoded}"),
            ("ACL Anthology search", f"https://aclanthology.org/search/?q={encoded}"),
            ("NeurIPS proceedings search", f"https://papers.nips.cc/search?q={encoded}"),
            ("ICML proceedings search", f"https://proceedings.mlr.press/?q={encoded}"),
            ("AAAI search", f"https://ojs.aaai.org/index.php/AAAI/search/search?query={encoded}"),
            ("Papers with Code search", f"https://paperswithcode.com/search?q={encoded}"),
        ]
        return [
            PaperResult(
                source="venue-hints",
                lane=name,
                title=f"Search {name}: {query}",
                url=url,
                kind="search_hint",
                evidence="Source-specific venue search URL; inspect manually or through browser/web tools.",
            )
            for name, url in hints[:limit]
        ]
    
    
    def dedupe_results(results: list[PaperResult]) -> list[dict[str, Any]]:
        buckets: dict[str, dict[str, Any]] = {}
        for result in results:
            title_key = re.sub(r"\W+", " ", result.title.lower()).strip()
            key = title_key or result.url
            data = asdict(result)
            data["authors"] = data.get("authors") or []
            if key not in buckets:
                data["lanes"] = [result.lane]
                data["sources"] = [result.source]
                data["queries"] = [result.query] if result.query else []
                data["lane_count"] = 1
                buckets[key] = data
                continue
            target = buckets[key]
            if result.lane not in target["lanes"]:
                target["lanes"].append(result.lane)
            if result.source not in target["sources"]:
                target["sources"].append(result.source)
            if result.query and result.query not in target["queries"]:
                target["queries"].append(result.query)
            target["lane_count"] = len(target["lanes"])
            if not target.get("abstract") and result.abstract:
                target["abstract"] = result.abstract
            if not target.get("date") and result.date:
                target["date"] = result.date
            if not target.get("venue") and result.venue:
                target["venue"] = result.venue
        return sorted(
            buckets.values(),
            key=lambda item: (
                item.get("kind") == "search_hint",
                -int(item.get("lane_count") or 1),
                item.get("date") or "",
                item.get("title") or "",
            ),
            reverse=False,
        )
    
    
    def run_source(
        source: str,
        query: str,
        limit: int,
        days: int,
        timeout: int,
        max_pages: int,
    ) -> tuple[str, list[PaperResult], str, float]:
        started = time.time()
        try:
            if source == "arxiv":
                return source, search_arxiv(query, limit, days, timeout), "", time.time() - started
            if source == "openreview":
                return source, search_openreview(query, limit, days, timeout), "", time.time() - started
            if source == "openalex":
                return source, search_openalex(query, limit, days, timeout), "", time.time() - started
            if source == "biorxiv":
                return source, search_biorxiv(query, limit, days, timeout, max_pages), "", time.time() - started
            if source == "medrxiv":
                return source, search_medrxiv(query, limit, days, timeout, max_pages), "", time.time() - started
            if source == "chemrxiv":
                return source, search_chemrxiv(query, limit, days, timeout), "", time.time() - started
            if source in {"venue-hints", "venues"}:
                return source, venue_hints(query, limit, days, timeout), "", time.time() - started
            return source, [], f"unknown source: {source}", time.time() - started
        except Exception as exc:
            return source, [], f"{type(exc).__name__}: {exc}", time.time() - started
    
    
    def main() -> None:
        parser = argparse.ArgumentParser(description="Search multiple paper-source lanes in parallel.")
        parser.add_argument("--query", required=True, action="append", help="Search query. Repeat for intent-query expansion.")
        parser.add_argument("--sources", default=DEFAULT_SOURCES, help=f"Comma-separated sources. Default: {DEFAULT_SOURCES}")
        parser.add_argument("--limit", type=int, default=8, help="Max results per source.")
        parser.add_argument("--days", type=int, default=365, help="Recent window for source APIs that require a date range.")
        parser.add_argument("--timeout", type=int, default=20, help="Per-request timeout in seconds.")
        parser.add_argument("--max-pages", type=int, default=3, help="Max bioRxiv/medRxiv pages to scan.")
        parser.add_argument("--workers", type=int, default=6, help="Parallel source workers.")
        args = parser.parse_args()
    
        sources = [s.strip().lower() for s in args.sources.split(",") if s.strip()]
        queries = [q.strip() for q in args.query if q.strip()]
        all_results: list[PaperResult] = []
        source_stats: dict[str, Any] = {}
        with ThreadPoolExecutor(max_workers=max(int(args.workers or 1), 1)) as pool:
            futures = {
                pool.submit(run_source, source, query, args.limit, args.days, args.timeout, args.max_pages): (source, query)
                for source in sources
                for query in queries
            }
            for future in as_completed(futures):
                source, results, error, elapsed = future.result()
                _, query = futures[future]
                for result in results:
                    result.query = query
                all_results.extend(results)
                stat_key = source if len(queries) == 1 else f"{source} :: {query}"
                source_stats[stat_key] = {
                    "source": source,
                    "query": query,
                    "hits": len(results),
                    "error": error,
                    "elapsed_seconds": round(elapsed, 3),
                }
    
        payload = {
            "query": queries[0] if len(queries) == 1 else "",
            "queries": queries,
            "generated_at": now_utc().isoformat(),
            "sources_requested": sources,
            "source_stats": source_stats,
            "unique_results": dedupe_results(all_results),
        }
        print(json.dumps(payload, ensure_ascii=False, indent=2))
    
    
    if __name__ == "__main__":
        main()
    
  • .codex/skills/research-material-scout/references/decision-driven-scouting.md4.4 KB45c2d599e493upstream ↗
    # Decision-driven discovery and benchmark reading
    
    ## Discover evidence that can change a decision
    
    Start with one to three unresolved questions and the artifact each answer changes. Check current notes and canonical material IDs before searching. Separate `already_read`, `gap_read`, `first_read`, and `assistant_digest` in the reading recommendation without inventing lifecycle fields.
    
    For X, use complementary query families: the exact benchmark/mechanism; its strongest competing explanation; and author/project updates. Compare Top and Latest when useful. Ambiguous common names need a paper ID, author, or distinctive technical phrase. A noisy query is a reason to refine or stop, not to ingest its unrelated results.
    
    For each useful lead, retain post URL/author/date and follow its original paper/repository. Check whether the latest paper changes an older blog's conclusion. Keep positive and negative findings with their task/model/budget boundaries. Deduplicate by canonical paper ID, repository, and existing note coverage; do not create another record for a new tweet about the same material.
    
    Stop when the key evidence gaps have adequate coverage or further results repeat existing sources. Report novel verified candidates, revised existing materials, useful duplicates, and rejected/unread leads with reasons. No candidate-count quota. High-value candidates still require the managed workflow's ranking settlement and readback.
    
    Do not put private employment disputes, offer terms, internal names or private message excerpts into search queries. Reading authorization is not authorization to post, message, follow, bookmark, join a group, or change accounts.
    
    ## Read benchmarks as measurement contracts
    
    A user operating or making claims from a benchmark should personally inspect:
    
    - **Construct:** what capability is tested; one long task versus learning across tasks or changing environments.
    - **Feedback:** agent-visible feedback versus evaluator-only measurements; hidden tests, cooldowns, oracle access and contamination.
    - **Budget/comparator:** model and harness versions; wall time, inference/learning cost, restart and sequential-refinement baselines; held-out task separation.
    - **Metric:** best-so-far versus the delivered final artifact; pass@k versus pass@1; valid-run exclusions, repeated seeds, uncertainty, grader calibration.
    - **Attribution:** state preservation versus useful experience; generating a memory/update versus using it; selection effects and task-specific adaptation versus transfer.
    - **Limits:** failures, missing runs, protocol drift and which claims the evidence cannot establish.
    
    Give a reader map with actual section/figure/table identifiers and an output (for example, a one-page evaluation contract). Long derivations, every task appendix and infrastructure code can remain assistant-led unless they affect the user's claim. Do not demand complete-paper reading for every benchmark. Check existing notes before proposing additions; if they already cover the mechanism and limitations, move to an experiment or decision instead of repeating the explanation.
    
    ## Horizon-wave and effort-stratified ranking
    
    When settling or auditing a ranked material queue against a confirmed Decision Context, prevent three common ranking failures:
    
    1. **Separate effort band from topic importance:** stratify active materials into horizon waves (`imminent_gate` -> `active_sprint` -> `foundational_track` -> `orthogonal_backlog`) and effort bands (`quick_slice` <= 30m, `focused_study` 1-3h, `deep_monograph` multi-session course/book). Never bury a high-VOI `quick_slice` behind an unsliced `deep_monograph`; multi-session courses/books either carry an explicit chapter slice (`scoped_slice_ready=true`) or stay in `foundational_track`.
    2. **Audit load-bearing primary lineage first:** before reranking, inspect active deliverables, specs, and architecture drafts for cited foundational papers/reports. Settle any missing primary source via exact-read `intake` (or `revise` if only a secondary announcement exists) before running rerank, and enforce primary-over-secondary precedence (`primary_source_refs`) so tutorials/commentary never outrank their primary technical report.
    3. **Cap orthogonal hot topics in the Top Window:** high-quality industry news, interviews, or adjacent product launches that are orthogonal to active horizon deliverables belong at the top of `ranked_backlog` (`#31+`), not crowding `Top30` decision slots.
    
  • .codex/skills/research-material-scout/references/paper-reading-protocol.md9.6 KB2521a7143c75upstream ↗
    # `请你读 / 精读`:替代首读的讲解
    
    适用于用户指定的文章、论文、书籍章节、报告、代码仓库与材料合集。目标是让用户理解材料本身的主要论证、关键细节与启发;不是只判断材料值不值得读,也不是先筛选对当前项目有用的部分。`精读` 在同一覆盖基础上增加推导、代码或复现实验深度。
    
    ## 范围与来源
    
    - 先通读用户指定范围的正文和关键图表,再按关键论点追附录、引用和代码。单篇阅读不能套用素材雷达的“扫读后只深读高优先级部分”;长书按用户指定章节处理。摘要、搜索片段、标题树和引用论文都不能代替所指定材料的正文。
    - 论文优先 HTML,缺失的公式、附录、算法用 TeX / PDF 补齐;实现问题追 repo、配置和实际数据。沿用 skill 的来源读取路径,记录实际版本与读取范围;源码优先 commit-pinned 文件链接。
    - 关键引用属于论证链:若作者据某项研究选择数据配方、架构或策略,或据此提出反直觉结论,追读该研究直接相关的实验/推导,并把比较对象、预算、结果和例外融入讲解。主报告只写一句或不是其原创贡献,都不能成为省略理由;一般背景引用无需展开,不递归通读全部文献。二手文章仍先还原自己的主线,不用一篇引用论文替代整篇文章。
    - 无法核验的关键观点仍需交代“作者如何论证、哪部分待核实”,不能悄悄删掉,也不能当成事实复述。正文读取不全时说明缺失范围,不宣称已经替代首读。
    - 阅读只在对话中讲解;原文、图片与读取证据可缓存到 `.local/` 或任务产物目录。不改 `Notes/`、索引、素材生命周期或排序,项目改造只给建议;写入等用户明确要求 `整理笔记 / 读完`。
    
    ## 先还原作者怎样得出结论
    
    读完先形成简短的论证提纲,按原文各主要部分识别新增贡献及其连接:
    
    > 问题与现象 → 前提与概念 → 机制解释 → 证据或实例 → 推论 → 对策及其代价
    
    提纲中为承重主张标出证据在正文、图表、附录还是引用中;交付前再核对它在回答中的实际解释位置。无需另建文件或固定模板,正文可以重组,但必须保留支撑判断的逻辑:
    
    - **为什么**:作者为何从这个现象走到下一个判断?引用某项研究是在提供定义、实验证据、反例、理论限制,还是一种解释?不要把引用缩成论文名列表。
    - **区别在哪里**:保留改变理解的对比、负结果与非显然洞见,如能力与倾向、现象与原因、诊断与优化目标、训练趋势与模型规模;不要压缩成泛泛的“更强也有风险”。
    - **具体是什么**:关键数字附比较对象、指标和条件,挑承重比较复算;公式、表格、正文冲突时明确指出,不能静默选一套数值或替作者修表。案例讲发生了什么、为何能说明问题;公式解释符号、直觉与适用范围。保留必要的原文字段、prompt、代码入口、图表编号和术语。
    - **怎么办、付出什么**:对策要对应前面的失败机制,说明它改变哪一环、依赖什么、有什么代价或新失效路径。不能把数据、训练、评测等多层方案缩成自己最熟悉的工程方案。
    
    原文中的关键洞见无需等用户点名才保留。数据工程、训练配方等支撑章节也按“为什么这样做 → 相对什么方案 → 凭什么 → 何时不成立”解释,不能只剩操作名词。可以压缩重复、背景和修辞,不能删掉整个解释分支、重要反例或取舍;与当前项目无关、尚未证因果或不能立刻转成产物,都不是省略理由。
    
    ## 按材料类型下钻
    
    | 材料 | 需要解释到什么程度 |
    | --- | --- |
    | 综述、观点文章、跨论文分析 | 作者串联材料的主线;各分支的新洞见与承重例子;观察、机制假说与已有证据之间的关系。分类综述还要说明分类轴、收录范围、代表项及空白,不能虚构一套隐藏算法。 |
    | 方法、训练、系统、代码仓库 | 先补必要背景,再从目标与边界到对象/接口、端到端控制流和具体案例;说明输入输出、可变/固定部分、目标函数或监督、验证和失败处理。 |
    | 实验、benchmark | 任务与数据构造、split、反馈可见性、baseline、指标、预算、主要结果及消融;讲清比较到底排除了什么、还混着什么,数字不能脱离实验合同。 |
    | 理论、教材 | 问题、定义、假设、关键公式或推导的作用、具体例子与反例;不以结论列表代替理解过程。 |
    | 工具或标准合集 | 先讲共同问题与工作流,再解释每项职责、核心抽象/字段、用法、限制及相互关系;不能用生态名词清单代替讲解。 |
    
    有迭代、演化、优化、训练、搜索、调节或状态迁移时,讲至少一条来源可核验的真实变化链:
    
    > 初始状态 → 观测/失败与可见反馈 → 候选变化 → 验收/拒绝 → 继承后的新状态
    
    展示关键字段、policy、代码或行为的 before/after、指标变化、评估条件与固定部分。多个可变 policy 可用小表串起变化;有公开失败候选就解释一次失败,区分持续进步、平台期与反复搜索。多个因素一起变时不要把收益独归一个因素。缺少完整轨迹就明确缺到哪一步;示意例子可以帮助理解,不能冒充真实演化。
    
    ## 系统学习与基本功
    
    阅读讲解默认交付两层内容。先讲清材料本身,再从相关笔记和已知背景补齐本次所需的先修概念,把一两个承重机制讲到可以迁移。优先沿同一例子说明输入、状态、步骤、输出,以及改变一个条件后哪些结果会变。数学或算法可给逐步核对的手算。系统或代码可给可执行、可追踪或可排障的最小路径。观点与实验材料可用关键反例或一项能区分解释的对照。
    
    至少把一个例子当场做完,给出答案或可核对的判据。面试、工作、技术交流等场景只决定例子的侧重和深度。面试可追问推导、实现或适用条件。工作可由失败现象推到可区分的原因和所需证据。技术交流可从图表或源码练习限定一条主张的比较对象、预算和范围。点明教学例子与实际验证各自的范围。交付前检查,去掉论文专有名词后,读者是否还能推理同类新问题。篇幅随材料和问题调整。
    
    ## 讲解与判断的顺序
    
    先让读者理解作者说了什么、为何这样说,再在相应位置校准证据,最后讨论对用户的启发。可以开头给一句核心判断,但不能用一段“尚未证明因果/泛化”替代主体讲解。
    
    区分作者观察、引用研究的结果、作者推论与 Codex 判断;不要求每句挂标签,用自然措辞和就近来源即可。核验以承重结论为准:因果看隔离,泛化看未见任务/模型,提升看可比 baseline 与预算,系统收益看成本/延迟/可靠性;有方差、泄漏、复现依赖或捆绑改动时保留这些边界。提出最有解释力的替代原因或缺失实验,避免机械堆“还需更多研究”。
    
    项目映射放在材料讲清之后,仅给确有依据的改造建议;不要求每个机制硬接职业主线,也不固定输出 schema、TODO 或核验问题的数量。用户说“笔记精简”不等于“讲解也删掉细节”;讲解要有层次,精简的是套话、重复与无关背景。
    
    ## 图表与交付检查
    
    最终回答直接展示关键图片并就近读图:标签/坐标、比较对象、主要结果及边界,附来源。优先实际检查过的原图或表截图;无合适原图时可用标明“Codex 示意”的忠实图解。图的数量按解释需要决定,不以图片链接、读过图的声明或固定张数代替读图。访问失败则说明缺口,不编图或测量结果。
    
    发出前,用原文论证提纲反向检查回答,而不是检查模板标题是否齐全:
    
    1. 每个主要部分及其承重引用是否在回答里得到解释?有没有把“作者采用了什么”当作“为什么采用、证据是什么”已经讲完?
    2. 改变理解的反直觉结论、对比、负结果、关键案例/图表、措施及代价是否仍在?用户点名的问题是否回答?
    3. 对每个关键点,读者能否理解“是什么、为什么、凭什么、在哪些条件下成立”,而不只是看到一个术语?
    4. 是否用项目建议或证据批评挤掉了作者内容?区分“未读”“读过未讲”“已解释”:承重内容只读未讲仍是漏项,缺证据也应保留作者逻辑并说明缺口。
    
    漏项先补进正文再交付;检查可以在工作提纲中完成,无需输出长清单。只有覆盖检查通过,才能说“本文讲解足以替代首读”。用户已说“不看原文”,就把必要内容融入讲解;不能用必读链接把缺漏推回给用户。
    
    末尾简短列出实际阅读范围与影响结论的缺口。将“值得 Codex 读透”与“用户仍需亲读”分开:只有亲读确有额外价值时,才给具体 section / figure / table / code 及理由;否则原文作为可选核验。不强制十一段模板、阅读时长或题目式核验清单。
    
    方法参考:[Keshav 三遍阅读法](https://systems.cs.columbia.edu/ds2-class/papers/keshav-paper.pdf)、[CMU 阅读论文讲义](https://deeplearning.cs.cmu.edu/F25/document/Recitation_0_Series/0.25/Recitation0.25_How_to_read_a_research_paper.pdf)。三遍法用于从定位到重建的深度安排,不是删掉作者主要论证的许可。
    
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/huangruiteng-cs-notes-codex-skills-research-material-scout.md

// REPO STATS

4.0k stars
3 open issues
Last commit: 3d ago