/kw-engine:kw-explorefrom kw-engine
Problem-driven research loop that decomposes projects into problem structures, maps them to a principle library, and assembles principle-grounded designs. Use when iterating on a research idea.
Ships in kw-engine. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This is the problem-driven loop. (/kw is the corpus-driven loop: absorb papers, synthesize
globally. /kw-explore starts from the user's actual problem and pulls the library toward solving
it.) It is the workflow that turns the engine from a knowledge library into a research accelerator.
You are the orchestrator. Dispatch the kw-* subagents for reading/distilling (model boundary
below); do the framing/mapping/assembly reasoning yourself.
Separation of concerns (hard rule). Use-case outputs — the problem decomposition, the design,
the handoff — go in the user's project (cwd). Reusable principles go into the linked
knowledge base (kw status shows which one). Never mix: the knowledge base stays domain-general
and reusable across projects.
Model boundary (same as /kw). The orchestrator never reads PDFs or calls read_*/search_*/
download_* MCP tools. Acquisition → kw-fetcher (sonnet); reading → kw-reader (sonnet);
distilling → kw-distiller (opus). Pass model explicitly on every Agent dispatch.
Prerequisite: the project must be linked to a knowledge base. If kw status errors, run
kw link <name-or-path> (or /kw-init) first.
A good decomposition is most of the value. Do not skip to fetching papers.
If a Question Card already exists (<project>/problems/<slug>/QUESTION.md, produced by
/kw-question): the question's worth is already validated — do NOT re-litigate stakes/
falsifiability. Read the card and go straight to extracting the structural signature (below).
If the user only has a vague idea and no card, and it's unclear whether the question is even
worth pursuing, suggest running /kw-question first.
<project>/problems/<slug>/PROBLEM.md: the signature axes, plus what any solution MUST
satisfy (the constraints — e.g. "must work on both targeted-amplicon AND shotgun data").For each seed paper the user has (or names), run the standard absorb loop:
kw-fetcher (if no local PDF) → kw-reader → kw-distiller → then kw-verifier scope=all.
New principles land in the linked knowledge base. If the user has no papers yet, skip to Phase 2
(the library may already cover part of the problem) and lean on Phase 3.
For each axis of the problem signature, run kw search "<axis keywords>".
Build a coverage map and show it to the user:
memory/synthesis/gaps.md)."A pile of papers that's not enough" shows up here as gaps. That's expected — Phase 3 closes them.
For each gap, propose specific papers or searches that would supply the missing mechanism (name candidate authors/titles/DOIs). On the user's pick:
kw-fetcher the chosen papers → absorb (reader → distiller → verifier).kw search and update the coverage map.
Report each round: which gaps closed, which remain. Loop until coverage is good enough OR the user
stops. Never auto-run many fetch rounds without a pick — keep the human steering.Compose the matched principles into a candidate design/solution for the user's project:
<project>/docs/DESIGN.md. (See the PRISM design as a worked example of the target
shape: modules, math specs, data requirements, validation plan, traceability matrix, risks.)The design is living — each future round of reading sharpens it. Write/update
<project>/plan/HANDOFF.md: current state, decisions made (with rationale), the next gaps to fill,
and the exact commands/prompts to resume. Also write a short <project>/docs/RATIONALE.md
capturing WHY the design is shaped this way (the problem signature + the direction choices) so a
fresh session can continue seamlessly.
Reproducibility: after each phase, append a one-line run record (phase, ids touched,
subagents+models, date) to .kw/logs/runs.log.
After Phase 4, offer: "(a) 补更多 gap (b) 深化某个模块的设计 (c) 跑 L3 综合看全局 (d) 收尾写 handoff".
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub chenpg2/kw-engine --plugin kw-engine4 skills in this plugin
/kwSingle entry for the knowledge engine. Detects state and offers choices — fetch papers by id/DOI/title, absorb all new papers (L1→L2), run L3 synthesis. Use when the user says "process the knowledge base", "/kw", "fetch this paper", or drops new papers./kw-initScaffold a new knowledge engine workspace OR link to an existing shared knowledge base. Use when starting a new knowledge base or connecting a project to an existing one./kw-questionSharpen a vague idea, a literature gap, or a stalled project into a GOOD research question — consequential, specific, falsifiable, feasible — BEFORE committing to a technical route. Produces a structured Question Card, then optionally hands off to /kw-explore to form the technical route. Triggers: "is this a good research question", "help me sharpen my question", "我这个想法值得做吗", "把想法变成研究问题", "问题挖掘 / 具象化", "帮我磨一下研究问题".Other plugins' skills for the same job