From research-clab
Scaffolds complete multi-agent research collaboration in current directory: agents, skills, rules, knowledge tooling, Session 0 plan for any domain. Supports --dry-run.
How this skill is triggered — by the user, by Claude, or both
Slash command
/research-clab:new-research-projectThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Scaffold a complete multi-agent research collaboration in the current working directory. This skill is the single authority — it drives the entire pipeline from user input to project completion. Origami docs (`project-origami/*.md`) are referenced for detailed content specifications but this file controls execution order and flow.
Scaffold a complete multi-agent research collaboration in the current working directory. This skill is the single authority — it drives the entire pipeline from user input to project completion. Origami docs (project-origami/*.md) are referenced for detailed content specifications but this file controls execution order and flow.
All templates and assets resolve from ${CLAUDE_PLUGIN_ROOT}.
ONE QUESTION PER CALL. NO EXCEPTIONS. Every AskUserQuestion invocation must have exactly one entry in the questions array. Multi-question calls silently fail in the terminal UI — the user sees nothing, the tool auto-resolves with blank answers, and the agent continues talking to itself. This is a known platform limitation.
Rules:
questions array length = 1./new-research-project
/new-research-project --dry-run
--dry-run: Show what would be created without writing anything.$ARGUMENTS contains any user-provided text.Verify these paths exist under ${CLAUDE_PLUGIN_ROOT}:
templates/agent-templates/
templates/agent-roster.md
templates/session-templates/
templates/MCP-templates/
templates/skills/
templates/claude-md/
templates/claude-md/rules/
project-origami/
agents/
If any are missing, stop: "Plugin assets incomplete. Reinstall the research-clab plugin."
The target is the current working directory.
.claude/agents/: note it in the status output (do NOT use AskUserQuestion for confirmation — that's broken in this turn).git init.This is the ONLY thing your first response should do. Print a status summary and stop. Example:
=== /new-research-project ===
Pre-flight:
Plugin assets: OK (found at ${CLAUDE_PLUGIN_ROOT}/)
Git repo: OK
Existing agents: WARNING — .claude/agents/ exists (will confirm overwrite)
Mode: --dry-run
Ready to collect project parameters. Type 'go' to start.
STOP HERE. Do not call AskUserQuestion. Do not proceed to Phase 1. Wait for the user to respond. Their response creates the turn boundary that makes AskUserQuestion work.
This phase starts in your SECOND response, after the user has replied to the Phase 0 status output.
SERIAL QUESTIONS ONLY. Ask the user ONE question at a time using a single AskUserQuestion call with exactly one entry in the questions array. Wait for the user's answer before asking the next question. Never batch multiple questions into one AskUserQuestion call — the UI silently drops multi-question prompts.
Ask the user: "What is the project name? (lowercase, hyphenated — e.g., protein-folding-dynamics)"
Ask the user: "What research domain? (e.g., computational biology, algebraic topology, climate modeling)"
Ask the user: "What is the primary research question? (1-2 sentences)"
Ask the user: "What document format will this project produce?"
Ask the user: "Does this project need computation infrastructure?"
Store all inputs. These are referenced as {project-name}, {domain}, {research-question}, {output-format}, {hardware} throughout.
After collecting all user inputs, launch TWO Agent invocations in parallel (both in the same response). These agents execute Phases 2-7 concurrently. You (the main skill) do NOT execute any of these phases directly — the agents own them.
Use the Agent tool:
subagent_type: "general-purpose"name: "coordinator-scaffold"prompt: Must include ALL of the following so the agent can work autonomously:
"You are the coordinator agent for the research-clab plugin. Read your full agent definition at {plugin-root}/agents/coordinator.md — find the '## /new-research-project — Scaffolding Directives' section and execute the 'Infrastructure Setup Task' exactly as specified."project-name: {project-name}domain: {domain}research-question: {research-question}output-format: {output-format}hardware-specs: {hardware} (or "none")plugin-root: resolved absolute path of ${CLAUDE_PLUGIN_ROOT}target-dir: current working directory (absolute path)"Do NOT call AskUserQuestion. All user interaction is handled by the main skill."The coordinator will read the project-origami docs, create directories, copy all static assets (using templates/infrastructure-agents/ as the source for infrastructure agents — NOT agents/), generate project-specific files, install methodology and team protocol, and run the infrastructure gate verification.
Use the Agent tool:
subagent_type: "general-purpose"name: "indexer-knowledge-init"prompt: Must include ALL of the following:
"You are the indexer agent for the research-clab plugin. Read your full agent definition at {plugin-root}/agents/indexer.md — find the '## /new-research-project — Scaffolding Directives' section and execute the 'Knowledge System Initialization Task' exactly as specified."project-name: {project-name}domain: {domain}research-question: {research-question}plugin-root: resolved absolute path of ${CLAUDE_PLUGIN_ROOT}target-dir: current working directory (absolute path)"Do NOT call AskUserQuestion. All user interaction is handled by the main skill."The indexer will read unfold-knowledge.md, determine domain-specific entity types, write the schema and index, seed its own memory, and verify the knowledge triad.
Wait for BOTH agents to return. Check their reports:
.claude/agents/coordinator.md, tools/knowledge-schema.yaml, tools/knowledge-index.json, agents.md.READ: ${CLAUDE_PLUGIN_ROOT}/project-origami/unfold-mcp.md — follow its 6 steps.
This phase runs after infrastructure and knowledge setup are complete but before agent selection. It presents the user with optional MCP servers that enhance the project's research capabilities.
SERIAL QUESTIONS ONLY. This phase uses AskUserQuestion — one question per call, wait for each answer.
The unfold-mcp doc handles:
${CLAUDE_PLUGIN_ROOT}/templates/MCP-templates/ for available MCPs.mcp.json, updating settings and CLAUDE.mdIf the user selects "None": skip to Phase 8. No MCP configuration is written.
If Python is not found: the unfold explicitly alerts the user — it does NOT silently skip. The user decides whether to skip or provide a Python path.
READ: ${CLAUDE_PLUGIN_ROOT}/project-origami/unfold-agents.md — follow its 5 steps.
SERIAL QUESTIONS ONLY. Every user-facing question in this phase uses exactly one AskUserQuestion call with exactly one entry in the questions array. Wait for the user's answer before proceeding. Never batch multiple questions.
Print the archetype menu as plain text output (NOT as a question — just show it so the user can see the options):
=== AGENT ARCHETYPES ===
CORE (pick 1 Skeptic + 1 Calculator + 1-2 Workhorses):
1. SKEPTIC "Prove it."
2. CALCULATOR "Stop debating. Run it."
3. WORKHORSE "I'll work through this properly."
4. PRINCIPALIST "What MUST be true?"
5. DREAMER "What if this is actually THAT?"
6. BOUNDARY GUARD "Here are the limits."
CONNECTORS (add later):
7. OBSERVER "What does the data say?"
8. BRIDGE "The original source says..."
UTILITY (optional):
9. GENERALIST Broad coverage, gap-filler.
10. FORMATTER Domain-specific document preparation.
INFRASTRUCTURE (already installed):
- Coordinator, Indexer, Scout
Analyze {domain} and {research-question}. Recommend a starting roster:
Then ask the user ONE question: present 2-3 pre-built roster options (e.g., "Recommended 4", "Minimal 3", "Full 5") using a single AskUserQuestion call with one question. Keep option labels short (under 8 words) and descriptions under 15 words. Wait for their answer.
If user tries to skip Skeptic: "Skeptic is non-negotiable — without adversarial review, everything looks promising." Ask again (single AskUserQuestion, one question).
If user selects >5: "Start with 5 max, add more later via /new-researcher." Ask them to trim (single AskUserQuestion, one question).
For each selected archetype, ask the user ONE question for a persona overlay. This lets the user inject a real person, personality, or tone modifier (e.g., "Carl Sagan", "Gordon Ramsay", "asshole", "my thesis advisor") that shapes the agent's voice and approach beyond the base archetype.
For each agent, sequentially:
"[Archetype] — {brief archetype description}. Add a persona overlay?"{domain}. The suggestion should make the user think "oh, that's a good fit." Examples of the reasoning:
"Persona overlay for {Archetype}?""No Persona Overlay" (description: "Use base archetype voice") AND the domain-relevant suggestion from step 2 (description: 3-5 word style note). Minimum 2 options required by the tool — the user can always select "Other" to type a custom persona.persona: field in the agent definition stays empty. If custom text, it becomes the persona: value and modifies the agent's generated prompt.This is N questions for N agents — one at a time, serial.
After collecting all persona overlays, you (the agent) generate the full persona specs using:
Build a 15-30 word persona spec for each, embedding BOTH the archetype's cognitive style AND the persona overlay into the domain. A Skeptic with persona "asshole" gets a combative, dismissive spec. A Skeptic with persona "Carl Sagan" gets a warm-but-rigorous spec. A Skeptic with no overlay gets the default evidence-demanding voice.
For persona-based specs (real person named): include at least ONE concrete intellectual move or signature position from that person. Do NOT write "Sagan-style empiricist" -- write "Sagan-style empiricist -- baloney detection kit, extraordinary claims need extraordinary evidence." The spec is the SEED that /new-researcher will expand via its Step 1.5 persona research. A richer seed produces a richer agent.
Follow unfold-agents.md Step 3 for construction rules and examples.
Before writing anything, present the complete spec list as plain text, then ask the user ONE question using a single AskUserQuestion call with one question:
Show specs in your output text:
Here are your domain agent specs:
1. [Skeptic / "Sagan"] "Carl Sagan-style empiricist for {domain} — demands evidence, pre-registration, controls" (coral)
2. [Calculator / no overlay] "{sub-domain} computation specialist — produces artifacts, benchmarks everything" (teal)
3. [Workhorse / "Gordon Ramsay"] "Ramsay-intensity {sub-domain} specialist — shows every step, berates sloppy work" (amber)
Then ask: "Approve these agent specs, or revise?"
If the user revises, rework specs and re-present. Ask the same single approval question again. Loop until approved.
After persona specs are approved, launch ONE Agent invocation to write the queue, update the registry, and generate the Session 0 prompt.
Use the Agent tool:
subagent_type: "general-purpose"name: "coordinator-post-selection"prompt: Must include ALL of the following:
"You are the coordinator agent for the research-clab plugin. Read your full agent definition at {plugin-root}/agents/coordinator.md — find the '## /new-research-project — Scaffolding Directives' section and execute the 'Post-Selection Task' exactly as specified."project-name: {project-name}domain: {domain}research-question: {research-question}date: {today}plugin-root: resolved absolute path of ${CLAUDE_PLUGIN_ROOT}target-dir: current working directory (absolute path)"Do NOT call AskUserQuestion. All user interaction is handled by the main skill."The coordinator will write researcher-queue.md, update agents.md with queued agents, and write session-0-prompt.md.
After completion: Verify sessions/session-plan/researcher-queue.md exists with at least 2 rows (Skeptic + Calculator minimum). Verify agents.md shows queued agents. Verify sessions/session-plan/session-0-prompt.md contains the research question.
Run through this checklist. Every item must pass:
.claude/agents/.claude/rules/.claude/skills/ (each with SKILL.md).claude/templates/session-templates/.claude/templates/agent-templates/.claude/templates/agent-roster.md exists with agent name-to-type mapping.claude/settings.local.json is valid JSON.gitignore existsagents.md exists with infrastructure + queued agentssessions/session-plan/format-selection-guide.md existssessions/framework/constraint-methodology.md existssessions/framework/handoff-template.md existstools/knowledge-schema.yaml has 9+ universal entity types + domain typetools/knowledge-index.json is valid JSON with empty arrayssessions/session-plan/researcher-queue.md has at least 2 entriessessions/session-plan/session-0-prompt.md has the research questionsessions/session-00/ directory exists.mcp.json exists at project root and is valid JSONPrint completion summary using the insight block format. The content inside must be GENERATED from the actual project — not boilerplate. Describe what makes THIS project's agent team distinctive, how the selected archetypes create productive tension for THIS research question, and what the first session will actually investigate.
★ Insight ─────────────────────────────────────
{project-name} — {domain}
{2-3 sentences: what this project's agent team is built to do.
Reference the specific archetypes selected, the adversarial
pairs they form, and why that team composition fits the
research question. This should read like a colleague explaining
"here's why we staffed the project this way."}
Structure:
.claude/agents/ ............ 3 infrastructure + {N} domain (queued)
.claude/skills/ ............ 11 skills installed
.claude/rules/ ............. 8 behavioral rules
sessions/ .................. Session 0 prompt ready
tools/ ..................... Knowledge schema initialized
Next:
1. /new-researcher for each entry in researcher-queue.md
2. Start a NEW SESSION (reload agents and skills)
3. /clab-team sessions/session-plan/session-0-prompt.md
─────────────────────────────────────────────────
The insight block is the LAST thing the user sees before deciding whether to process the researcher queue. Make it count — it should make them feel like the project is coherent and ready, not just that files were copied.
Ask via AskUserQuestion: "Create domain agents now, or defer to later?"
READ: ${CLAUDE_PLUGIN_ROOT}/project-origami/unfold-papers.md for the full processing protocol.
For each row in researcher-queue.md, sequentially invoke:
/new-researcher "{Persona Spec}" --archetype {archetype} --papers {N} --color {color}
/new-researcher spawns a web-researcher agent.After ALL /new-researcher invocations complete:
/librarian {FolderName} for each created researcher folder (sequential — each creates a team).researchers/index.md with a cross-domain table.agents.md — replace "Queued" status entries with actual agent names and roles.Report: "Researcher queue saved at sessions/session-plan/researcher-queue.md. Run /new-researcher for each entry when ready."
If --dry-run: run Phases 0-1 and 8a-8d only. Display what WOULD be created (directory tree, file list, recommended agent roster, persona specs). Write nothing.
| Problem | Fix |
|---|---|
| Plugin assets missing | Stop. "Plugin assets incomplete. Reinstall the research-clab plugin." |
Existing .claude/agents/ | Warn and confirm overwrite before proceeding. |
| User skips Skeptic | Explain non-negotiable. Ask again. |
| User selects >5 domain agents | Warn. "Start with 5 max, add more via /new-researcher." Let them trim. |
/new-researcher fails for a queue entry | Report failure, continue to next entry. |
| Python not available (knowledge) | Skip accelerator. Core knowledge system works without it. |
| Python not available (MCP) | Alert user explicitly. Offer skip or manual path. Never silently skip. |
| MCP package install fails | Offer retry, skip, or manual install. Write config anyway if manual. |
| No git repo | Run git init before Phase 2. |
| Stale team/task state | Delete in Phase 6c. |
Root CLAUDE.md template has unfilled {{...}} variables | Substitute or strip — no mustache variables in final output. |
npx claudepluginhub meme-theory/meme-engine --plugin research-clabOrchestrates full research pipeline from Brainstorming to Reporting via Planning, Implementation, Testing & Visualization phases with user checkpoints. Configurable for physics, AI/ML, statistics, math domains, depth, and agent personas.
Generates researcher spec files from task descriptions via 3-stage pipeline: template copy with Node scripts, MF/Tool selection and filling via LLM judgment, LLM placeholder completion. Outputs absolute spec path for teammate creation.
Orchestrates a full research-plan-implement pipeline using parallel subagents, each in its own context window, with file artifacts as the communication channel between phases.