/mycelium-extra:grillfrom mycelium-extra
Planning: turn a research, analysis, or software task into a sourced step-by-step plan and wait for approval (unless the gate is off). Use to scope, plan, pressure-test, or promote explore runs; not for reviewing finished code or results (use Mycelium's review).
Ships in mycelium-extra. 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.
Read when SKILL.md points to them.
Turn a proposed task into a sourced, step-by-step plan before anything runs. Ask for the user's question first, retrieve, decide what the evidence supports, ask the user only what remains, then stop and wait for approval. Make no edits during this skill. The one exception is gate off, where the plan runs without waiting (section 4).
Before reading any file or data (except the Purpose of the target analysis doc, when the task names an analysis folder), and before proposing anything, ask the user in one free-text message, opening with a one- or two-sentence reminder of what the task is (restate only what the invocation, the handoff, or the user has already said, with no goal, claim, or result drafted for them), for the question in their own words and the claim they hope to make (for a software task, the goal and the result they hope for). Offer no drafted options or examples: a drafted answer anchors the user to it. If the invocation, or the Purpose of the target analysis doc (where new-analysis records the user's words tagged [human-stated]), already states either part in the user's own words, quote it and ask only for the missing part; if it states both, skip the question. This question does not count toward the cap in section 3. If the user declines, go on.
CLAUDE.md, AGENTS.md, and similar)..living/ exists. MYCELIUM.md is optional: many Mycelium repositories carry only a Mycelium block in CLAUDE.md or AGENTS.md, or no guidance file at all. Partial structure is normal. Follow references/mycelium.md for the lookup order, entry-ID caveats, and fallbacks.GLOSSARY.md at the root when it exists (with GLOSSARY-MAP.md, the glossary of the context the task touches) and use its terms in the plan.rg and read excerpts; do not load whole memory histories or large data. Before stating that something is absent, run a targeted search for it.track-changes review brief (what changed against the approved intent) instead of re-deriving the changes, and treat its Unknown lines as open. It sits at .mycelium-extra/track-changes/<analysis path with /written as__>/brief.md: a folder name two analyses share gets a -<hash> suffix, and track-changes prints the folder it wrote. Check its second line, Snapshot <time> · original plan <hash> · current plan <hash>: use it only when current plan is the plan you are revising and the snapshot time is later than that plan's approval; otherwise it predates the plan, so run track-changes again before relying on it.contracts/<analysis>.yaml exists in the analysis folder and lucid-coder is installed, read it through lucid-coder's CLI (find the plugin root with a read-only ls under ~/.claude/plugins/cache/lucid-coder/lucid-coder/; the file is read-only to you). Run node <lucid-coder root>/scripts/contract.js asks contracts/<analysis>.yaml: it prints one dotted path per field still set to ask. Each path is a user question in section 3, worded in the user's terms, and never a default. Run contract.js status contracts/<analysis>.yaml and cite its line under Evidence (approved, not approved or approval stale) tagged [agent-derived: contracts/<analysis>.yaml]; a contract that is not approved or stale is an open item in the plan, not a settled fact. Hand the table check to data-contract-check once the sample table is known. Name the contract file under Inputs: so the gate pins it. With no contract file, or without lucid-coder or node, skip all of this and change nothing else.<skill-dir>/../../hooks/mxpy - --plugin-root <skill-dir>/../.. knobs <script> [<script> ...] < <skill-dir>/../verify/scripts/verify.py. They are the top-level all-caps values lucid-coder's house style keeps after the header. Each knob that could change a headline estimate, a ranking, a selected feature or a conclusion is its own plan row, sourced inherited: <script>, and the recommended answer is the script's value (flagged when it differs from the package default). Ask for a one-line confirm in the impactful-choices table. A path or root is not a knob. A script that keeps its values inline has no knob block: say so and read the code for the values.rg (a file's header line often answers a column question). If a data property must be checked (columns, layers, dimensions, sample counts), use a brief inline read-only probe (python3 -c, Rscript -e, or heredoc stdin) that writes nothing, run with the interpreter or environment the repository documents (for example conda run -n <env> python -c ...). lucid-coder.yaml at the root names it (env.manager, env.name, env.r, env.python): use those paths, and keep one Evidence bullet Environment: <manager> <name> [agent-derived: lucid-coder.yaml], or Environment: not recorded [agent-asserted: none] when no file names one. If the probe fails, do not debug it: mark the property unverified and make checking it the plan's first validation step. For sample-table properties the plan's validity rests on (cohort levels and counts, unit of replication, pairing, batch versus contrast), use the data-contract-check skill (process-substitution form only, so no file is written) instead of ad hoc probes; a blocking alert becomes a plan edit or a DECISION_REQUIRED. When the plan rests on a metadata table nobody has opened, you may also offer its optional descriptive profile (data-contract-check --profile-only): it describes, it is not a check, and no expectation may be taken from it. Never run a repository script, notebook, or pipeline by path during grilling: in a Mycelium repository that opens the post-action cycle, and the Stop hook then blocks until .living/ is updated. If a Mycelium hook demands post-action updates anyway, tell the user which command tripped it and follow the hook.For analysis work, read ../plot-first/SKILL.md. Make plots the primary interpretive outputs. Carry each question's figure path, source data, and visual check into the existing plan; use tables only with a stated fallback reason. This remains read-only and adds no interview questions. For each headline estimate, the Validation cell also names two things beyond its check: an external arbiter, what other than the agent or the user would show the result right (a held-out cohort, a positive control, an orthogonal assay), and the result that would change the decision, with the noise floor. Naming them is the user's call when they are impactful, so they follow the impactful-choices rule: asked, never a default. The plot-first skill's "Explain the number" section says what the report must then show.
For scientific and statistical work, use references/scientific-conventions.md after obtaining the user's question and retrieving project evidence. Identify only activated domain guidance, selectively read its relevant sections, and carry consequential scientific rules, exceptions, sources, and falsifiable checks into the existing plan. Never mistake a convention for proof that a dataset or implementation satisfies it. This adds no interview questions, approval authority, execution, or external retrieval.
Keep a compact internal evidence map: claim, source/path, date or commit if material, status (intended, implemented, observed, proposed), applicability, and confidence. Distinguish current user intent from repository evidence and from your inference. A file's existence does not prove its outputs are current; a past decision does not prove the current implementation follows it.
Test only relevant axes: goal, evidence/data, assumptions, meaningful alternatives, failure modes, and validation. When the plan is blocked — a decision point that will not resolve from the repository, or a claim whose discriminating check cannot yet be written — work it with references/polya-heuristics.md, which backward-chains claim to estimand to replication unit to check and applies five selective heuristics; it adds plan rows, never questions. For scientific work, distinguish exploration, prediction, and causal or mechanistic inference, and identify the unit of analysis and obvious leakage or confounding risks. For any bioinformatics or statistical analysis, walk references/analysis-decisions.md: every applicable decision point must appear in the plan with a source, and none may stay implicit. Then walk references/llm-failure-modes.md: for every applicable failure mode, the plan names a guard with a source, and never claims a planned: check already runs. The lists set coverage, not reading depth. A standing repository contract (for example scientific rules in AGENTS.md or an active convention) is valid repo evidence, and a point that cannot be sourced cheaply becomes a labeled default with a validation step.
Challenge vocabulary as you go. When the user's word conflicts with GLOSSARY.md, or is overloaded (sample: donor, library or cell? replicate: biological or technical? batch, contrast, layer), name the conflict and propose one term. A term the plan settles goes in the brief's Terms to record.
When the task changes a package (a DESCRIPTION, or a pyproject.toml with a package folder), follow references/package-plans.md: each row names its seam and the test that fails first, with an expected value from an independent source.
Challenge a premise directly when the repository contradicts it. When a prior decision or finding rejects the design the user asked for, do not silently override either side: present the evidence, recommend the repository's position or a reconciled design, and ask if the user owns the trade-off. Do not manufacture objections or expand the scope into an exhaustive audit.
Resolve apparent conflicts by checking authority, recency, applicability, and whether a source explicitly supersedes another. Implementation describes what ran; conventions and decisions may describe what should run. When two or more decision entries cover a choice the plan depends on, settle them with the decision-status skill's parser and resolution rules, but write nothing: a resolution the user confirms goes in the brief's "Decisions to record". To settle conflicting decision entries, point the user to /mycelium-extra:decision-status.
Resolve each consequential decision by the first rule that applies:
repo: <path>). A choice an earlier stage already made (its code, config or analysis doc) is never silently reused: it gets its own plan row, sourced inherited: <path>, which is not settled until the user confirms it in one line. A closed decision recorded in the repository (a decision entry or an AGENTS.md contract) counts as repo:, not inherited:.default: <reason>). Never for an impactful choice (see below).user). When such a methodological question has no repository evidence, the question may add an evidence lookup as one option; follow references/evidence-assistance.md. When the user asks for Socratic mode, or types explain row N, explain plan or challenge row N, follow references/socratic.md; all are read-only and off by default.user question the user says someone else owns (a PI, core facility or collaborator) is parked with the return condition answer from <role>; /mycelium-extra:questionnaire turns those into a file to send.Impactful choices. A choice is impactful when a plausible alternative would change a headline estimate, a ranking, a selected feature or a conclusion. Examples, not a complete list: preprocessing and transformation (centering, scaling, z-scoring, log), filters and exclusions, feature or sample selection, model family and priors, covariates, random-effect structure, tuning grids and hyperparameters, thresholds, the multiple-testing family, the endpoint and time anchor, seeds and replicate counts. An impactful choice is always user, inherited: or (for a closed repository decision) repo:, never default. The user asks about it even when the question cap is reached; the confirmation table and inherited: confirms do not count toward the cap. Put every impactful choice of a round in one confirmation table. package-defaults-first: the recommended answer is the package default, stated as package, version and default value. List an alternative only with a named paper or documented theory, a repo or corpus count, or a yardstick (a benchmark, simulation, sensitivity run or gate that measures the change). Without one, the row carries the default alone, and a tuning grid with no yardstick is dropped. A package with no default gets no invented one: ask. A row with no package default but a convention from another tool or project (a repair cap, an iteration floor, a replicate count) shows no Recommended: value; list the convention as one option labelled with its source, and ask. A default known to fail on this data may be overridden only with named evidence. A seed has no package default: ask. The user's own answer is always accepted and becomes Source user. For an inherited: row or a closed repo: row, the recommended answer is the earlier stage's or the repo's value, flagged if it differs from the package default. During a run, an impactful choice the plan did not list (a convergence fix, a changed parameter, a dropped outlier) stops the run for a question; do not proceed on a default.
Ask in rounds. A round holds every user question whose prerequisites are already settled, most consequential first; a question whose answer depends on another question still open waits for the next round. Number them Q1, Q2, ... and give each: the evidence you found, the options, and a Recommended: line worded so that "yes" accepts it; for an impactful choice it is the package default, and an option other than the default appears only under package-defaults-first. The user answers by number. After the answers, recompute the frontier and ask the next round; stop when no user-owned unknown would change the plan. Beyond the opening question, ask zero questions if nothing qualifies. Cap: five questions per grill, counted across rounds, not per round. The cap is a circuit breaker, not a target. At the cap, turn remaining user-owned points into labeled defaults in the plan; the approval step is where the user overrides them. The cap never applies to impactful choices: ask those regardless. Do not restart a question tree or evade the cap by subdividing a question. If the user says "good enough," stop and write the plan. If the user says "one question at a time," ask one per message for the rest of the grill.
A round looks like this (one probe per question when Socratic mode is on, placed after the evidence):
**Q1. <title>**
Evidence: <what the repository says, with paths>
Options: (a) ... (b) ...
Recommended: (a), because <reason>
**Q2. <title>**
...
When a round holds an open impactful-choice row, offer grill-visual in one line: the user types it (../grill-visual/SKILL.md) to see the options, consequences and saved figures on one page. The answers still come back in chat.
After each answer, check: would plausible answers to any remaining user-owned unknown change the plan? If not, stop.
Before writing the brief, check the frontier: walk every consequential branch of the decision tree once and settle each as repo, user, default or parked. A branch with none of these is a silent assumption: source it, ask it within the cap, or make it a labeled default. The brief reports the result in one Frontier: line. End with one status. Each status describes the plan; none grants permission to execute.
READY: every consequential decision is sourced from the repository or the user.READY_WITH_ASSUMPTIONS: the plan is stable, and some decisions rest on labeled, reversible defaults the user can override at approval without re-planning.DECISION_REQUIRED: one user-owned choice leads to materially different plans (estimand, data, or deliverable), and no default is defensible without the user's intent. Give the options, a recommendation, and the consequence of each. Do not pretend the question cap resolves a blocker.Write a brief of at most 150 words. The plan table, the quoted question, the Inputs:, Outputs:, Facts:, Frontier: and Plan status: lines, a <!-- plan-evidence --> block, and the guards references/llm-failure-modes.md asks for do not count, and are never cut to meet the limit: the gate pins and verify checks from them. Open it with the user's answer from section 0, quoted verbatim:
> Question (user's words): "<answer>"
> Hoped-for claim: "<answer>"
If the user declined, write > Question: not stated (the user declined). instead.
Then the sections below, in order. The rules for each (what qualifies, how to cite, how the approval card quotes a row, what the gate and verify read) are in references/brief-format.md; follow it when writing the brief.
[human-stated], [agent-derived: <artifact path>], or [agent-asserted: <source>] ([agent-asserted: none] with no source), then one count line, for example Facts: 4 agent-derived, 1 human-stated, 1 agent-asserted (1 unsourced). Keep the bullets the plan's choices rest on, and always one that names a failure, a flag, or an unverified fact: the approval card quotes those.Inputs: <path>, <path>, the files the plan's validity rests on (Inputs: none when nothing qualifies). The gate pins them at approval. A run plan also lists the code it freezes: references/run-plans.md.Outputs: <path>, <path>, the files or folders the plan's runs will write, each path in full (Outputs: none when the plan writes nothing); a step folder outputs/<script stem>/ is marked (overwrite) by you, since a rerun overwrites it by design; any other path that already exists needs a fresh run folder or the user's (overwrite). Verify checks each was written by a run of this plan.repo: <path>, user, inherited: <path>, or default: <reason>), Validation. The Step cell names by repository path every script, notebook, pipeline, wrapper and launcher (sbatch, snakemake, nextflow) the plan runs: the gate grants runs from this column alone. Choice and Validation are one decision and one check in plain scientific terms; the card quotes them. Mark a finished step (done).<!-- exact-execution {...} --> and <!-- validation-bindings {...} --> for a reportable run, per references/run-plans.md.<!-- plan-evidence {...} --> block per references/plan-evidence.md, whenever at least two Evidence bullets rest on a file read; JSON in a comment, never a table.default row in one line, then the key failure mode and how the plan detects it.Frontier: 6 repo, 2 user, 1 default, 1 parked; 0 open..living/decisions.md in a Mycelium repository, otherwise as an ADR under docs/adr/ only when the three tests in brief-format.md hold. The executing agent also keeps a per-run decision log of every impactful choice and fork, one row per choice linked to its plan row: references/decision-log.md.GLOSSARY.md; omit when none.Put the brief and the plan table in your final message, and end it with the status on its own line, exactly Plan status: READY, Plan status: READY_WITH_ASSUMPTIONS, or Plan status: DECISION_REQUIRED. At READY or READY_WITH_ASSUMPTIONS, offer /mycelium-extra:plan-review once when the plan is scientific and the user has not declined it before. Where the mycelium-extra approval gate is enabled (.mycelium-extra/gate.json), its hook hashes that message and shows the user approve (or approve plan <hash>); never print or guess a hash yourself, and never add the gate's explore prefix to a command unless the user asks for an exploratory run.
Then stop, unless the gate is off (.mycelium-extra/off.json exists): the switch is the user's approval, so say so in one line and start executing the plan as written, recording its decisions and terms first. With the gate on, wait even under an active /goal: say in one line that the plan waits for approve, and do not run it to meet the goal. In this turn, do not execute, create analysis folders, or write to .living/, manifests, todo, or analysis files. Execution starts only after the user approves or edits the plan, and it follows the repository's normal lifecycle, carrying the approved plan and the decisions to record. Name other skills rather than assuming they can be invoked programmatically.
Use the same skill for all three; there is no second questionnaire. Resuming or debugging an approved plan: restate the user's already stated question and claim (section 0), and ask only about a choice that is consequential and still unresolved; do not re-ask what the approved plan, a decision entry, or the user has settled. After two fixes that share one premise fail the same check, stop: do not try a third. Write the premise in one sentence (what both fixes assumed), propose one read-only test that would come out differently if it were false, and ask the user one question. This is an unplanned impactful choice: no default, and the five-question cap does not apply. Revert what a refuted hypothesis motivated. Debugging inside the approved scope needs no new plan: the user can type allow explore <plan hash> for exploration bounded to that plan's analysis paths. Freezing: when a protected test or expectation, or a frozen step's arguments, must change, or the user wants a reportable run, write the revised run plan (see references/run-plans.md) with fresh Outputs: paths for approval. Explore outputs are never relabelled as results.
When the user asks to promote explore runs (make them reportable, plan a re-run of what was explored), list them read-only:
<skill-dir>/../../hooks/mxpy - --plugin-root <skill-dir>/../.. explore [--session ID | --all] < <skill-dir>/../verify/scripts/verify.py
It lists this session's explore runs of gated code (the session comes from $CLAUDE_CODE_SESSION_ID, or --session ID; where neither is set, as in Codex and OpenCode, it lists every session of the last 7 days, as --all does), one per distinct command with the MYCELIUM_EXTRA_EXPLORE=1 prefix removed, the paths each ran, its exit status, conda env, and whether its script changed since. Then grill as usual (sections 0 to 4): the plan table names each script, wrapper, and command to re-run, without the prefix; ask the user which runs to keep when that is not clear. Explore outputs are not results, so the plan re-runs everything and its Outputs: line names fresh paths. Promotion needs an approved rerun with fresh output identity: verify reports an output written by an explore attempt and not re-observed under a matched approved attempt as not re-run under approval, never relabelled. The listing also shows each attempt (failed ones too) with its code version and scope. Use references/run-plans.md when the user wants the code frozen. Explore runs of inline code (python -c) are not listed; add them by hand if they matter.
agents/openai.yaml (opens in a new tab)references/analysis-decisions.md (opens in a new tab)references/brief-format.md (opens in a new tab)references/cold-reader.md (opens in a new tab)references/decision-log.md (opens in a new tab)references/evidence-assistance.md (opens in a new tab)references/llm-failure-modes.md (opens in a new tab)references/methods/bayesian.md (opens in a new tab)references/methods/longitudinal.md (opens in a new tab)references/methods/single-cell.md (opens in a new tab)references/mycelium.md (opens in a new tab)references/package-plans.md (opens in a new tab)references/plan-evidence.md (opens in a new tab)references/polya-heuristics.md (opens in a new tab)references/run-plans.md (opens in a new tab)references/scenarios.md (opens in a new tab)references/scientific-conventions.md (opens in a new tab)references/socratic.md (opens in a new tab)tests/test_grill_references.py (opens in a new tab)tests/test_method_guides.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mdmanurung/mycelium-extra --plugin mycelium-extra35 skills in this plugin
/analysis-mapChart a research program too big for one session as a map of decision tickets, then resolve them one at a time. Plans decisions; runs no analysis./analysis-reportFill the Quarto report new-analysis scaffolds in reports/ after a run. Narrative, quoted script excerpts, a step diagram and inspected figures in Overview, Methods, Results and Reproducibility tabs./ask-extraAsk which Mycelium Extra skill fits your situation. Names one to three skills to type and why; starts none of them.Other plugins' skills for the same job