craft-analyze
CommandPost-cycle analysis — QA, UX, Creative, and Style audits using MCP browser tools.
Ad-hoc research command. Parallel researcher agents investigate sub-questions, write branch files to disk, orchestrator ranks and synthesizes. Resumable across sessions.
> /plugin marketplace add drobins25/craft> /plugin install craft@craft
name: research description: "Ad-hoc research command. Parallel researcher agents investigate sub-questions, write branch files to disk, orchestrator ranks and synthesizes. Resumable across sessions." argument-hint: "[query | topic-slug | continue | --quick | --deep | --exhaustive]"
Ad-hoc research tool. Not part of the craft pipeline - use it whenever you want to understand something. Phase 1 produces comprehensive research most users never need to go beyond. Phase 2 is the optional "go deeper" layer.
Use `$CRAFT_PROJECT_ROOT` (set at session start) as the base path for all `.craft/` references. When it is not set, run `bash -c 'source "$1" >/dev/null 2>&1; craft_before_init_root' _ "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/find-workshop.sh"` and use the folder it prints.
Research runs fine before `/craft:init`; artifacts land under that folder's `.craft/research/`, not wherever the shell happens to sit.
Set `PROJECT` to that folder. Never default to bare `.`.
Parse args to determine routing:
**Mode A - New research query:** Args contain a natural language query (not a known topic slug or "continue"). → Jump to **Step 2** (Discover).
**Mode B - Existing topic slug:** Args match an existing folder name in `$PROJECT/.craft/research/`. → Jump to **Step 1b** (Browse Topic).
**Mode C - "continue" keyword:** Args are exactly `continue`. → Jump to **Step 1c** (Resume).
**Mode D - Quick flags:** Args contain `--quick` or `--deep` or `--exhaustive` after the query. → Extract the query and depth flag. Jump to **Step 2** with depth preset.
**Mode E - No args:** Jump to **Step 1** (Dashboard).
List existing research topics and their status.
Use **Glob** with pattern `$PROJECT/.craft/research/*/_plan.md` to find all research topics.
For each topic found:
**If no research exists:** > "No research yet. What would you like to research?" > > [Wait for user input, then jump to **Step 2**]
**If research exists:**
Use **AskUserQuestion**:
question: "You have [N] research topics. What would you like to do?"
header: "Research"
options:
- label: "Start new research"
description: "Research a new topic from scratch"
- label: "Browse existing"
description: "[list: topic1 (complete), topic2 (STALE), topic3 (depth 1 - can go deeper)]"
- label: "Go deeper on existing"
description: "Pick a topic and elaborate on specific branches"
→ only show if any topics have branch files eligible for Phase 2**If "Start new research"** → Ask "What would you like to research?", then jump to **Step 2**. **If "Browse existing"** → Jump to **Step 1b** with topic picker. **If "Go deeper"** → Jump to **Step 1b** with intent to elaborate. **If user provides custom text** → Treat as a new research query, jump to **Step 2**.
If multiple topics, use **AskUserQuestion** to pick one. If already selected (from Mode B), skip the picker.
Use **Read** to read the topic's `_plan.md`. Display the ranked overview to the user.
Use **AskUserQuestion**:
question: "What would you like to do with this research?"
header: "Topic"
options:
- label: "Go deeper on a branch"
description: "Pick a branch to elaborate further (Phase 2)"
- label: "Verify findings"
description: "Challenge claims against independent primary sources (runs /craft:research-verify)"
- label: "Crystallize into an expert"
description: "Create a reusable expert agent from this research"
- label: "Re-research (refresh)"
description: "This topic may be stale - run fresh research"
- label: "Done browsing"
description: "Back to what I was doing"**If "Go deeper"** → Show ranked branches from `_plan.md`, let user pick one or more. Jump to **Step 4** (Deeper Research). **If "Verify findings"** → Invoke `/craft:research-verify {topic-slug}`. **If "Crystallize"** → Jump to **Step 6** (Crystallize Expert). **If "Re-research"** → Jump to **Step 2** with the original query from the topic's frontmatter. Existing folder gets archived to `{slug}--archived-{date}/`. **If "Done"** → End. **If custom text** → Treat as clarification or new query in context of this topic.
Use **Glob** to find topics where `_plan.md` has `status: in-progress`.
If one topic → auto-select it. Check what phase it's in based on which files exist. If multiple → use **AskUserQuestion** to pick which topic to continue.
Resume from where it left off based on which files exist:
---
**This is the primary research product.** Most users stop here. The output should be comprehensive and valuable on its own.
Use **Read** to read `${CLAUDE_PLUGIN_ROOT}/commands/references/research-inline.md` and run it inline with `QUERY` (the user's query), `DEPTH` (`--quick` when that flag was set, otherwise none; `--deep` and `--exhaustive` stay with this command) and `PROJECT`. Set no `STORY` and no `DOOR`. It drafts the question and branches, checks the reading, creates the research folder, runs the researchers and the synthesizer, and presents the results.
**If `--deep` or `--exhaustive` was set:*
Post-cycle analysis — QA, UX, Creative, and Style audits using MCP browser tools.
Point at anything in a live browser tab - every pin gets a live attempt on the page the moment you SEND it, and the session keeps…
Consult a craft agent. Routes your question to the best mind in the workshop - not a menu, a recommendation.
Agent crystallization command. Studies a tool, role, or person and produces a portable 9-section agent that inhabits the domain -…
File a bug without fixing it, from a person mid-conversation or an agent mid-run. One door, a complete record on disk, nobody…
Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.