Merge Schemas
Regenerate the nextflow.config and nextflow_schema.json files for one or more Bactopia workflows by invoking bactopia-merge-schemas. Auto-discovers each workflow's output directory from catalog.json so the caller never hand-computes paths.
Steps
Identify the target workflow(s). Parse the user's request into one of these shapes:
- A specific workflow name (e.g.
teton,merlin,bactopia) - A list (e.g.
teton and staphopia) or a glob-ish pattern (e.g.all merlin tools,everything starting with blast) all tools→ every workflow withtype: toolin the catalogall named→ every workflow withtype: namedall→ every workflow in the catalog
If the ask is ambiguous (e.g. "regenerate merlin" — merlin is a named Bactopia Tool entry but also a subworkflow tag), confirm with the user before running anything. Never run without some kind of filter.
- A specific workflow name (e.g.
Resolve each target to a path from the catalog. Use the Read tool to read
/home/rpetit3/repos/bactopia/bactopia/catalog.json. For each requested workflowW:- Verify
catalog["workflows"][W]exists. If not, stop and report the unknown name — do not invoke the CLI. - Pull
catalog["workflows"][W]["path"]— this is the exact value to pass as--outdir. It is already relative to the repo root:.→ mainbactopiaworkflow (outputs land in the repo root)workflows/teton//workflows/staphopia//workflows/cleanyerreads/→ named workflowsworkflows/bactopia-tools/{name}/→ Bactopia Tools
- Record
catalog["workflows"][W]["type"](namedvstool) for the summary.
- Verify
Check for existing generated files. For each target
--outdir, use Read or Glob to check whethernextflow_schema.jsonornextflow.configalready exist. If any do:- List the affected workflows and files for the user
- Get explicit confirmation before proceeding with
--force - Without
--force, the CLI exits with an error on the first existing file
Do not pass
--forcepreemptively — it is a destructive overwrite of tracked files.Run
bactopia-merge-schemasonce per target via the wrapper:bash .agents/skills/merge-schemas/scripts/run-bactopia-merge-schemas.sh \ --bactopia-path /home/rpetit3/repos/bactopia/bactopia \ --wf <workflow> \ --outdir <path-from-catalog> \ --force # only if the user confirmed in step 3Run sequentially. On the first failure, stop and report — do not silently continue through a batch.
Summarize the result. For each target, report:
- Workflow name and type (
named/tool) - The
--outdirused - Which files were generated (
nextflow_schema.json,nextflow.config) - Pass/fail status
If nothing was regenerated (e.g. all targets refused
--force), say so explicitly.- Workflow name and type (
Notes
- The wrapper auto-discovers
bactopia-merge-schemas(PATH →bactopia-devconda env →bactopia-pyconda env → anybactopia-*env) --bactopia-pathis always/home/rpetit3/repos/bactopia/bactopia— do not guess or prompt--outdiralways comes fromcatalog["workflows"][wf]["path"]— never hand-compute it- The CLI writes only two files:
nextflow_schema.jsonandnextflow.config. The source also declaresparams.config/process.configvariables and includes them in its pre-flight existence check, but does not actually write them. If the user expects those files, tell them the current CLI does not generate them --forceis required if either of the two output files already exists. Ask firstconf/schema/{wf}.jsonbacks named workflows;conf/schema/bactopia-tools.jsonbacks tools. Generic parameters come fromconf/schema/generic.json. You do not need to touch these files — the CLI reads them directly- Typical catalog contents: 4 named workflows (
bactopia,teton,staphopia,cleanyerreads) and ~66 tools underworkflows/bactopia-tools/
CLI Reference (bactopia-merge-schemas)
Required:
--bactopia-path PATH— repo root--wf NAME— workflow key fromcatalog.json
Output:
--outdir PATH— directory to write outputs (default.)--force— overwrite existing output files
Other:
--verbose/--silent— log level--version/--help
Sibling Skills
/update-module— bumps tool versions inmodule.configandCHANGELOG.md. When a module update changes that module'sschema.json,/merge-schemasis the right follow-up for every workflow that includes the module./project-status— shows coverage and structural issues; useful for confirming catalog state before batch regeneration.