diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index bb0f201..e0ad5c2 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -29,6 +29,9 @@ jobs: - name: Install Claude Code run: npm install -g "@anthropic-ai/claude-code@${CLAUDE_CODE_VERSION}" + - name: Test skill consolidation + run: python3 -I tools/test_consolidate_skills.py + - name: Check provenance hashes and manifest versions run: python3 -I tools/check_sources.py diff --git a/README.md b/README.md index d7369ab..9830b4d 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Build, migrate, test, debug and run [Nextflow](https://www.nextflow.io) pipelines with Claude, connected to [Nextflow Platform](https://seqera.io), Wave containers and nf-core. -The plugin bundles 41 skills and the hosted Seqera MCP server (`https://mcp.seqera.io/mcp`). +The plugin bundles 28 skills and the hosted Seqera MCP server (`https://mcp.seqera.io/mcp`). ## Install @@ -43,11 +43,11 @@ To make the plugin available to everyone working in a repository, add it to that | Area | Skills | | --- | --- | -| Build pipelines | `create-workflow`, `build-nextflow-pipeline`, `nf-pipeline-design`, `nextflow-config`, `nextflow-schema`, `nextflow-output-patterns`, `search-existing-modules`, `run-module`, `create-container` | -| Convert to Nextflow | `convert-python-script`, `convert-r-script`, `convert-jupyter-notebook`, `migrate-from-snakemake`, `audit-conversion-readiness`, `triage-pipeline-parameters`, `find-alternative-tools` | -| Migrate and modernise | `migrate-nextflow-code`, `nextflow-26-syntax`, `nf-migrate-25-04`, `nf-schema-migration`, `nf-v2-boolean-params`, `nf-plugin-development`, `nf-plugin-legacy-migration`, `maintain-nf-core-pipeline` | -| Test and debug | `nf-test`, `repair-nf-test`, `repair-workflow`, `nf-debug`, `debug-local-run`, `debug-seqera-failed-run`, `nextflow-history`, `nf-run-history`, `nf-data-lineage`, `nf-docker-scripts` | -| Nextflow Platform | `launch-workflow`, `seqera-mcp`, `ce-credentials-setup`, `seqera-data-links`, `seqerakit` | +| Build pipelines | `build-nextflow-pipeline`, `nf-pipeline-design`, `nextflow-config`, `nextflow-schema`, `nextflow-output-patterns`, `search-existing-modules`, `run-module`, `create-container` | +| Convert to Nextflow | `build-nextflow-pipeline` (Python, R and notebook playbooks), `migrate-from-snakemake`, `audit-conversion-readiness`, `nextflow-schema` (parameter triage), `find-alternative-tools` | +| Migrate and modernise | `migrate-nextflow-code` (version, strict-syntax and boolean references), `nextflow-schema` (schema migration), `nf-plugin-development`, `nf-plugin-legacy-migration`, `maintain-nf-core-pipeline` | +| Test and debug | `nf-test` (authoring and failure repair), `repair-workflow` (including static diagnostics), `debug-local-run`, `debug-seqera-failed-run`, `nextflow-history` (history, cache and narrative recaps), `nf-data-lineage`, `nf-docker-scripts` | +| Nextflow Platform | `launch-workflow` (with shared MCP connection reference), `ce-credentials-setup`, `seqera-data-links`, `seqerakit` | | General | `nextflow-development`, `install-nextflow` | ## Licensing @@ -65,6 +65,7 @@ The plugin content is generated from a host-neutral Agent Plugins package. To up ```bash python3 -I tools/import_package.py /path/to/nextflow.zip python3 -I tools/check_sources.py +python3 -I tools/test_consolidate_skills.py claude plugin validate --strict . ``` @@ -73,7 +74,15 @@ regenerates `.claude-plugin/plugin.json`, `.claude-plugin/marketplace.json` and Do not edit those paths by hand; change the upstream package instead. The importer also drops the skills listed in `EXCLUDED_SKILLS` and applies the text edits in -`EDITS`, so the remaining skills don't reference removed ones. +`EDITS`. It then replays `tools/skill_consolidations.json`: removed entrypoints become linked +playbooks under their surviving skill, including supporting files and original provenance. +Change that plan (and any referenced curation assets), rather than editing generated skills. +To apply a new consolidation to an already imported tree, run: + +```bash +python3 -I tools/consolidate_skills.py +python3 -I tools/check_sources.py +``` To release, bump `VERSION` in `tools/import_package.py`, re-import, merge, then tag: diff --git a/skills/audit-conversion-readiness/SKILL.md b/skills/audit-conversion-readiness/SKILL.md index 7a1a235..a4cec13 100644 --- a/skills/audit-conversion-readiness/SKILL.md +++ b/skills/audit-conversion-readiness/SKILL.md @@ -22,7 +22,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -145,7 +145,7 @@ exists to prevent. With the audit answered, route onward: -- `triage-pipeline-parameters` — turn the surviving paths and +- [parameter triage](../nextflow-schema/references/triage-pipeline-parameters/README.md) — turn the surviving paths and constants into a parameter surface and schema - `create-container` or `nf-docker-scripts` — tools with no usable image @@ -153,8 +153,8 @@ With the audit answered, route onward: - `find-alternative-tools` — tools blocked by license, GPU requirements, or abandonment - `seqera-data-links` — cloud data the pipeline must read -- Then the conversion skill itself: `convert-python-script`, `convert-r-script`, - `convert-jupyter-notebook`, `migrate-from-snakemake`, or `create-workflow` +- Then the conversion skill itself: [Python conversion](../build-nextflow-pipeline/references/convert-python-script/README.md), [R conversion](../build-nextflow-pipeline/references/convert-r-script/README.md), + [notebook conversion](../build-nextflow-pipeline/references/convert-jupyter-notebook/README.md), `migrate-from-snakemake`, or [registry composition](../build-nextflow-pipeline/references/create-workflow/README.md) ## Guardrails @@ -165,5 +165,5 @@ With the audit answered, route onward: - Never treat a missing file as a reason to drop the step from the conversion — it is a question for the user. - Hardcoded paths are findings, not bugs to fix in place. The pipeline's - parameter surface is where they get resolved, in `triage-pipeline-parameters`. + parameter surface is where they get resolved, in [parameter triage](../nextflow-schema/references/triage-pipeline-parameters/README.md). - Keep the audit read-only. No edits to the source material, no scaffolding. diff --git a/skills/build-nextflow-pipeline/SKILL.md b/skills/build-nextflow-pipeline/SKILL.md index 04f27d6..6eb17b6 100644 --- a/skills/build-nextflow-pipeline/SKILL.md +++ b/skills/build-nextflow-pipeline/SKILL.md @@ -7,7 +7,7 @@ description: > mapping the data flow, critiquing it, shaping channels and metadata, scoping subworkflows, hunting for existing modules, and only then building containers and writing code. Use this skill whenever the user asks to - "build a pipeline", "port this to Nextflow", "turn this notebook/repo/script + "build a pipeline", "compose registry modules", "port this to Nextflow", "turn this notebook/repo/script into a pipeline", or otherwise wants to go from an existing body of work to a clean Nextflow pipeline. Pair with `nf-pipeline-design`, which owns the code-level rules (layout, main.nf, subworkflow/module shape); this skill @@ -22,13 +22,19 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. -# Building a Nextflow pipeline from existing source material +# Build a Nextflow Pipeline + +## Choose the construction path + +For composing existing Registry modules, read [registry composition](references/create-workflow/README.md) and follow its plan → approval → module validation → composition → end-to-end verification loop. For a single module, use `run-module`; a wrapper workflow is unnecessary. + +For scripts, notebooks, repositories or analysis descriptions, use the source-material phases below. Load `nf-pipeline-design` for code-level rules in either path. This skill guides the **planning** of a Nextflow pipeline that is being built from something that already exists: a set of scripts, a GitHub repository, a Jupyter or R notebook, a methods section in a paper, or a half-formed description of an analysis. @@ -48,7 +54,7 @@ Delegate only when the host supports subagents; otherwise perform the same steps | Mapping the data flow | No — this is the core act of planning, keep it in the main conversation | — | | Triaging parameters and drafting `nextflow_schema.json` | **Yes** — hand the source material to one subagent | `nextflow-schema` | | Designing channels and metadata | No — needs the data flow map as live context | — | -| Enumerating alternative tools for each analysis step | **Yes — one subagent per analysis step, in parallel** | `find-alternative-tools` | +| Comparing alternatives, only when requested or the selected tool is blocked | **Optional** — delegate the bounded comparison when useful | `find-alternative-tools` | | Searching for existing Nextflow modules for each chosen tool | **Yes — one subagent per tool, in parallel** | `search-existing-modules` | | Building and verifying the container for each tool branch | **Yes — one subagent per tool, in parallel** | `create-container` | | Writing `main.nf`, subworkflows, and modules | No — this is a synthesis step that uses every prior artifact | — | @@ -70,14 +76,22 @@ in the conversation when file access is unavailable. Respect existing project organization. The useful artifacts are: - **the planning document** — the living planning document. One markdown file with sections for: data flow map, samplesheet design, channel shapes, subworkflow scoping with chosen tools per step, alternative-tool rationale, test-inputs table, container verification status. Every phase adds to it; subagent outputs get pasted or linked into the relevant section. -- **`nextflow_schema.json`** — the parameter contract. First-pass draft from Phase 1 (produced by `nextflow-schema`), augmented in Phase 3 with `enum` values from `find-alternative-tools` and any new tool-argument parameters revealed by module search. Always the source of truth for what the pipeline accepts. +- **`nextflow_schema.json`** — the parameter contract. First-pass draft from Phase 1 (produced by `nextflow-schema`), augmented in Phase 3 with approved implemented tool choices (if any) and relevant tool arguments revealed by module search. Always the source of truth for what the pipeline accepts. - **`nextflow.config`** — mirrors schema defaults, declares profiles, loads `modules.config`. First-drafted in Phase 1 alongside the schema; stays in sync with it. - **`modules.config`** — plumbs surfaced parameters into `ext.args` per module. Drafted in Phase 3 once tools are picked. - **`tower.yml`**, when Platform report integration is requested, maps the pipeline's primary published human-readable outputs to Nextflow Platform report entries. Draft it from the planned output layout and verify every pattern against a real run. - **the sample-sheet schema** — samplesheet schema, validates each row of the samplesheet at launch. Separate from `nextflow_schema.json` (which validates parameters, not rows). Drafted in Phase 1 once "what is a sample" is settled. - **the user's selected test data** — small, representative test inputs per tool. Identified during Phase 1 (the triage subagent returns a test-inputs manifest as a secondary artifact) and consumed by `create-container` subagents in Phase 4. -Treat `nextflow_schema.json` as a **living artifact** across phases. The Phase 1 draft is not the final version — each later phase may add new parameters (`enum` values after tool enumeration, new `ext.args` knobs after module search), and the main conversation is responsible for keeping the schema, `nextflow.config`, and the planning document in sync as those additions come in. +Treat `nextflow_schema.json` as a **living artifact** across phases. The Phase 1 draft is not the final version — each later phase may add new parameters (`enum` values for approved implemented alternatives, new `ext.args` knobs after module search), and the main conversation is responsible for keeping the schema, `nextflow.config`, and the planning document in sync as those additions come in. + +## Conversion contract + +For Python, R or Jupyter source, read the matching conversion playbook before scaffolding. Audit external files, helper code, dependencies and notebook state. Run the source on a small representative fixture when possible and record expected scientific outputs before changing execution structure. If the source cannot run, state that equivalence is unverified. + +Preserve tested algorithms by wrapping them. Split only at meaningful independently executable boundaries; file loading or a notebook cell alone does not justify a process. Preserve within-task threading and global/statistical operations. Validate the converted pipeline against the baseline outputs using exact or format-aware/tolerance-based checks appropriate to the algorithm. Compilation and lint alone do not establish equivalence. + +Use output syntax supported by the selected Nextflow version and the project's publication contract; legacy examples using `publishDir` are not a reason to undo workflow outputs. ## Phase 0 — Audit what the source material points at @@ -328,33 +342,24 @@ Each subworkflow should: - Be designed in clear **sections**: channel reshaping → module call → optional output reshaping. Readability matters. - **Harmonize inputs** — much of the value of a subworkflow is turning whatever upstream shape you got into exactly what the underlying tool needs, so the module stays boring. -### Implement branching between as many alternative tools as possible - -For each subworkflow, explicitly list the alternative tools considered (e.g. for multiple sequence alignment: MAFFT, MUSCLE, Clustal Omega, T-Coffee, HHblits; for folding: Boltz, OpenFold3, AlphaFold3) and then **implement the branching between them in the subworkflow**, not just pick one. - -The default assumption is that every step with multiple credible tools becomes a workflow-level `if/else` on an explicit parameter, with each branch calling one module. This is not a "nice to have" — it's what makes the pipeline actually useful: +### Select tools without expanding scope -- The original source material reflects *one* author's choice at *one* point in time. Alternatives are often better for other datasets, other organisms, other budgets, or simply newer than the paper. -- Tool choice is typically the single biggest determinant of output quality and runtime. Exposing it as a knob turns the pipeline into an experiment platform instead of a fixed recipe. -- Adding a second branch is cheap when you're writing the subworkflow; adding one later means reworking the subworkflow's input/output contracts under pressure. -- You are going through the container/module-building loop anyway (Phase 4). Doing it for 2–4 tools in one pass is only marginally more work than doing it for one. +Use the tool requested by the user or required to preserve the source analysis. If none is specified, recommend one suitable default and resolve material license, compute or output-contract constraints before implementation. -Concretely, this means: +Use `find-alternative-tools` only when the user requests a comparison or the selected tool is blocked. Research produces candidates; it does not authorize implementing them. -1. Surface the tool choice as a parameter in `nextflow_schema.json` with an `enum` listing every implemented option (see Phase 1 — this is exactly the kind of knob that belongs at the top level). -2. Structure the subworkflow as a workflow-level `if/else` over that parameter, with a final `else error "Unsupported : ${choice}"` branch. See the `RUN_FOLDING` example in `nf-pipeline-design` for the exact shape. -3. Harmonize inputs *upstream* of the branch and outputs *downstream* of the branch, so each tool module sees the same input shape and emits the same output shape. The subworkflow, not the caller, owns this normalization. -4. Build and verify containers for **every** implemented branch during Phase 4. A branch that exists in code but was never run once is technical debt, not a feature. +Add multiple tool branches only when the user explicitly requests or approves them. For approved branches: -Skip a branch only when the tool is genuinely obsolete, proprietary-licensed in a way the pipeline cannot accept, or architecturally incompatible (e.g. needs GPUs the target executor doesn't have). Record the reason for every tool you considered and did *not* implement — this document survives longer than the planning conversation and prevents the same alternative being revisited every six months. +1. Add only implemented choices to the schema's `enum`, keeping config defaults aligned. +2. Put tool selection in the subworkflow and reject unsupported choices explicitly. +3. Normalize inputs and outputs around the selected modules. +4. Verify every implemented branch's command, container and representative outputs. -**Delegate the enumeration when available.** For each analysis step in the data flow map, use the `find-alternative-tools` skill with the analysis step name plus any constraints (target executor, GPU availability, license restrictions). These tasks are independent and can run in parallel with one subagent per analysis step. Collect the ranked lists back into the planning document's "Alternative tools" section. - -Then **merge the suggested `enum` values into `nextflow_schema.json`** for each tool-choice parameter (e.g. `msa_tool: ["mafft", "muscle", "clustalo"]`). This is the first planned augmentation of the schema after Phase 1's draft — update `nextflow.config`'s `params {}` block alongside so defaults stay in sync. Also note any **nf-core module hints** the enumerate subagents flagged in their per-tool blocks; you will pass those forward to the next step as fast-path hints. +Record the selected tool and rationale. A single-tool pipeline does not need an alternative-tool parameter or exhaustive rejected-tool inventory. ### Search for existing modules before writing one -For every tool chosen as a branch, search for existing implementations in this priority order. This is not optional: reinventing an nf-core module costs days and produces worse code. +For each selected tool, search for existing implementations in this priority order. This is not optional: reinventing an nf-core module costs days and produces worse code. 1. **nf-core modules.** Search https://nf-co.re/modules and the `nf-core/modules` GitHub repo. If a module exists, use it (or vendor it). If one exists but doesn't quite fit, prefer extending it over writing a new one. 2. **The inputted source.** Check the scripts, notebooks, or repository you were given — is there already a containerized version, a Dockerfile, a conda env? Reuse it. @@ -403,16 +408,16 @@ Writing the actual `main.nf`, subworkflows, and modules should now be a mechanic ## Checklist before writing any `.nf` file -- [ ] the planning document exists and has sections filled for: data flow map, samplesheet design, channels, alternative tools, module sourcing, test inputs, container verification +- [ ] the planning document exists and has sections filled for: data flow map, samplesheet design, channels, selected tools (alternatives only if requested), module sourcing, test inputs, container verification - [ ] Data flow map has been critiqued, not just drafted - [ ] "Sample" is defined and the sample-sheet schema is drafted -- [ ] `nextflow_schema.json` is available to the user's pipeline, with defaults, descriptions, and `enum` values merged in after alternative-tool enumeration +- [ ] `nextflow_schema.json` is available with defaults and descriptions; any tool-choice `enum` lists only approved implemented branches - [ ] `nextflow.config` mirrors the schema defaults and declares profiles - [ ] `modules.config` plumbs surfaced parameters into `ext.args` per module - [ ] Channel shapes are listed for every major transition in the planning document - [ ] Cheap operations are assigned to operators/Groovy; expensive ones to modules - [ ] Each subworkflow has a one-sentence rationale and a named underlying tool (or set of alternative tools with branching) -- [ ] Alternative-tool enumeration ran for every analysis step with credible alternatives, using `find-alternative-tools` +- [ ] The selected tools match the requested analysis; any additional implemented branches were explicitly requested or approved - [ ] Existing-module search has been done for every chosen tool, using `search-existing-modules`, with verdicts in the planning document - [ ] Test inputs exist at the user's selected test data (or are specified to be derived) for every heavy tool - [ ] Containers are built and tool commands verified, delegated to `create-container` subagents where possible, with verified image references in the planning document @@ -424,3 +429,19 @@ Writing the actual `main.nf`, subworkflows, and modules should now be a mechanic - [ ] Primary report files exist in the published output tree - [ ] `tower.yml` patterns match the user's actual published reports - [ ] After a Platform launch, the workflow Reports tab lists the expected entries + +## Registry composition playbook + +When composing multiple Nextflow Registry modules, use the registry path instead of the source-material planning phases. Read [registry composition](references/create-workflow/README.md) before proceeding. + +## Python conversion playbook + +When converting a standalone Python script or Python analysis into Nextflow, preserve its algorithm and dependency contract. Read [Python conversion](references/convert-python-script/README.md) before proceeding. + +## R conversion playbook + +When converting R source into Nextflow, preserve statistical semantics, dependencies and meaningful task boundaries. Read [R conversion](references/convert-r-script/README.md) before proceeding. + +## Notebook conversion playbook + +When converting a Jupyter notebook, inventory cell dependencies and hidden state before extracting executable steps. Read [notebook conversion](references/convert-jupyter-notebook/README.md) before proceeding. diff --git a/skills/convert-jupyter-notebook/SKILL.md b/skills/build-nextflow-pipeline/references/convert-jupyter-notebook/README.md similarity index 79% rename from skills/convert-jupyter-notebook/SKILL.md rename to skills/build-nextflow-pipeline/references/convert-jupyter-notebook/README.md index 37a0002..5bce8de 100644 --- a/skills/convert-jupyter-notebook/SKILL.md +++ b/skills/build-nextflow-pipeline/references/convert-jupyter-notebook/README.md @@ -1,10 +1,3 @@ ---- -name: convert-jupyter-notebook -description: > - Convert Jupyter notebooks to Nextflow pipelines. Triggered when users ask to - convert, migrate, or translate a Jupyter notebook (.ipynb) into Nextflow - processes and workflows. ---- ## Using this skill @@ -14,7 +7,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../../../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -30,7 +23,7 @@ manages OAuth for the connected MCP server. ## Instructions -Convert the Jupyter notebook into **multiple Nextflow processes** — do NOT simply wrap the entire notebook in a single process. +Identify meaningful executable tasks rather than making each cell a process. Extract shared variables, cell-order dependencies, random state, working-directory changes and interactive assumptions explicitly. Wrap a single coherent analysis when appropriate; split independent tasks only when their file/value contracts are clear. ### Plan First @@ -57,6 +50,7 @@ After generating the pipeline: 1. Validate compilation using the user's selected pipeline and installed runtime 2. If there are syntax errors, fix them and re-run 3. Run `nextflow lint` to check for best practice issues +4. Run representative input through the extracted source and the converted pipeline; compare expected scientific outputs and report any unresolved notebook state Run validation with an available Nextflow installation and host execution tools. If either is unavailable, report validation as unverified and read diff --git a/skills/convert-python-script/SKILL.md b/skills/build-nextflow-pipeline/references/convert-python-script/README.md similarity index 93% rename from skills/convert-python-script/SKILL.md rename to skills/build-nextflow-pipeline/references/convert-python-script/README.md index 370c7cd..0efefe6 100644 --- a/skills/convert-python-script/SKILL.md +++ b/skills/build-nextflow-pipeline/references/convert-python-script/README.md @@ -1,10 +1,3 @@ ---- -name: convert-python-script -description: > - Convert standalone Python scripts to Nextflow processes and workflows. - Trigger: "convert python", "python to nextflow", "migrate python script", - "convert-python-script", "port python to nf", "rewrite in nextflow". ---- ## Using this skill @@ -14,7 +7,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../../../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -213,7 +206,7 @@ workflow { | `dict[key]` | Tuple channels with key: `[meta, file]` | | `try/except` | `errorStrategy 'retry'` or `'ignore'` | | Sequential loop | Chained processes (automatic parallelism) | -| `multiprocessing` | Remove — Nextflow handles parallelism | +| `multiprocessing` | Preserve intentional within-task parallelism; let Nextflow schedule independent task instances | ## Publishing Outputs @@ -240,7 +233,7 @@ This skill focuses on standalone Python script conversion. ## Common Pitfalls -1. **Don't parallelize inside the script** — Remove `multiprocessing`, `joblib.Parallel`, `concurrent.futures`. Nextflow parallelizes across process instances. +1. **Separate task scheduling from tool threading** — Preserve intentional within-task parallelism and expose resource requirements via `task.cpus`. Nextflow schedules independent instances; it does not replace a tool's internal parallel algorithm. 2. **Don't read/write to absolute paths** — Nextflow work dirs are isolated. Use relative paths in scripts. 3. **Don't manage temp files** — Nextflow handles work directory cleanup. 4. **Don't install dependencies in script block** — Use `conda`/`container` directives. @@ -312,3 +305,4 @@ Before delivering the converted pipeline: - [ ] Workflow wires processes correctly via channels - [ ] Error handling preserved (non-zero exit on failure) - [ ] String interpolation escaped correctly (`\$` for shell/Python vars) +- [ ] Representative execution matches the source's expected scientific outputs, using justified numerical tolerances when needed diff --git a/skills/convert-r-script/SKILL.md b/skills/build-nextflow-pipeline/references/convert-r-script/README.md similarity index 81% rename from skills/convert-r-script/SKILL.md rename to skills/build-nextflow-pipeline/references/convert-r-script/README.md index c81f685..005c38c 100644 --- a/skills/convert-r-script/SKILL.md +++ b/skills/build-nextflow-pipeline/references/convert-r-script/README.md @@ -1,12 +1,3 @@ ---- -name: convert-r-script -description: > - Convert R scripts to Nextflow pipelines. Analyzes R code to identify logical - steps, inputs, outputs, and dependencies, then generates modular Nextflow - processes with proper channels, containers, and conda environments. - Trigger: "convert R script", "R to Nextflow", "migrate R to Nextflow", - "convert this R script to Nextflow". ---- ## Using this skill @@ -16,7 +7,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../../../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -24,9 +15,7 @@ manages OAuth for the connected MCP server. # Convert R Script to Nextflow -Convert an R script into a well-structured Nextflow pipeline. Do NOT simply wrap -the script in a single process — decompose it into multiple processes connected -by channels. +Convert R source while preserving statistical behavior. Wrap tested R code when it is one meaningful task; decompose only at independently executable boundaries with explicit inputs and outputs. A shared normalization or model-fitting step must retain the full data context it needs. ## Workflow @@ -46,7 +35,7 @@ the usual blockers, and they are cheaper to surface now than mid-conversion. ### 2. Plan the pipeline structure -- Each logical step becomes a Nextflow process +- Choose meaningful task boundaries; keep cheap file loading/transforms with the analysis when separation adds no useful contract - Define channels connecting processes - Identify which R libraries each process needs - Determine parallelization opportunities (e.g., per-sample, per-chromosome) @@ -67,6 +56,7 @@ After generating the pipeline: 1. Validate compilation using the user's selected pipeline and installed runtime 2. Fix any syntax errors 3. Run `nextflow lint` to check best practices +4. Execute representative data and compare scientific outputs against the source baseline; use justified tolerances for numerical results Run validation with an available Nextflow installation and host execution tools. If either is unavailable, report validation as unverified and read @@ -129,5 +119,5 @@ process EXAMPLE { ## References -- `nextflow-dsl2.md` — DSL2 process and workflow syntax reference -- `r-container-images.md` — Common R container images and conda environments +- [DSL2 reference](references/nextflow-dsl2.md) — process and workflow syntax +- [R environments](references/r-container-images.md) — container images and conda packages diff --git a/skills/convert-r-script/references/nextflow-dsl2.md b/skills/build-nextflow-pipeline/references/convert-r-script/references/nextflow-dsl2.md similarity index 100% rename from skills/convert-r-script/references/nextflow-dsl2.md rename to skills/build-nextflow-pipeline/references/convert-r-script/references/nextflow-dsl2.md diff --git a/skills/convert-r-script/references/r-container-images.md b/skills/build-nextflow-pipeline/references/convert-r-script/references/r-container-images.md similarity index 100% rename from skills/convert-r-script/references/r-container-images.md rename to skills/build-nextflow-pipeline/references/convert-r-script/references/r-container-images.md diff --git a/skills/create-workflow/SKILL.md b/skills/build-nextflow-pipeline/references/create-workflow/README.md similarity index 93% rename from skills/create-workflow/SKILL.md rename to skills/build-nextflow-pipeline/references/create-workflow/README.md index ac23f04..2280718 100644 --- a/skills/create-workflow/SKILL.md +++ b/skills/build-nextflow-pipeline/references/create-workflow/README.md @@ -1,10 +1,3 @@ ---- -name: create-workflow -description: | - INVOKE THIS SKILL IMMEDIATELY when user asks to: write/create/build a Nextflow pipeline or workflow, - create any bioinformatics pipeline (RNA-seq, DNA-seq, variant calling, ChIP-seq, etc.), - or compose/chain Nextflow modules from the Nextflow Registry. This skill handles all Nextflow workflow creation tasks. ---- ## Using this skill @@ -14,7 +7,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../../../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. diff --git a/skills/ce-credentials-setup/SKILL.md b/skills/ce-credentials-setup/SKILL.md index a229304..11b9f1d 100644 --- a/skills/ce-credentials-setup/SKILL.md +++ b/skills/ce-credentials-setup/SKILL.md @@ -19,7 +19,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -37,15 +37,15 @@ Load this skill when the user wants to: - Understand what values are needed for a specific platform - Troubleshoot CE creation failures (wrong token, missing permissions, etc.) -**This skill complements `seqera-mcp`** — it covers HOW to gather values, while `seqera-mcp` covers HOW to call the creation tools. +Read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference for discovery and authentication. This skill owns provider prerequisites and compute readiness. ## General Workflow 1. **Identify platform** — ask which cloud/cluster (seqera-compute, aws-batch, k8s, etc.) 2. **Gather credentials** — run commands to get keys, tokens, certificates (skip for Seqera Compute) 3. **Verify locally** — confirm credentials work before sending to Platform (skip for Seqera Compute) -4. **Create credentials** — `platform_create_credentials` via seqera-mcp (skip for Seqera Compute) -5. **Create compute environment** — `platform_create_compute_env` via seqera-mcp +4. **Create credentials** — `platform_create_credentials` through discovered MCP operations (skip for Seqera Compute) +5. **Create compute environment** — `platform_create_compute_env` through discovered MCP operations > **Seqera Compute shortcut:** If the user is on Seqera Cloud and wants the simplest option, recommend Seqera Compute. It only needs a name and region — no credentials, no infrastructure setup. Skip directly to step 5. This is the path with the fewest moving parts and the fewest ways to fail. diff --git a/skills/ce-credentials-setup/references/kubernetes.md b/skills/ce-credentials-setup/references/kubernetes.md index 28c3328..c4c78ee 100644 --- a/skills/ce-credentials-setup/references/kubernetes.md +++ b/skills/ce-credentials-setup/references/kubernetes.md @@ -160,7 +160,7 @@ for this check. ## 6. Create Credentials in Seqera -Using the seqera-mcp tool: +Discover the credential-creation operation with `search_seqera_api` and execute it through `call_seqera_api`. The example below describes intent; use the current returned schema, not these illustrative field names: ``` platform_create_credentials( diff --git a/skills/create-container/SKILL.md b/skills/create-container/SKILL.md index dbdd1b3..a6c5ade 100644 --- a/skills/create-container/SKILL.md +++ b/skills/create-container/SKILL.md @@ -13,7 +13,7 @@ description: > "wrap for a Nextflow module", "fix this conda solve". Follows a build → run-test-input → iterate loop and returns a structured handoff (verified image reference + working command). Do not author the Nextflow - module here — that belongs in `create-workflow` after verification. + module here — that belongs in `build-nextflow-pipeline` after verification. --- @@ -24,7 +24,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. diff --git a/skills/debug-local-run/SKILL.md b/skills/debug-local-run/SKILL.md index fa84ce5..4adfa16 100644 --- a/skills/debug-local-run/SKILL.md +++ b/skills/debug-local-run/SKILL.md @@ -14,7 +14,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. diff --git a/skills/debug-seqera-failed-run/SKILL.md b/skills/debug-seqera-failed-run/SKILL.md index 060ab72..d1e992a 100644 --- a/skills/debug-seqera-failed-run/SKILL.md +++ b/skills/debug-seqera-failed-run/SKILL.md @@ -16,7 +16,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. diff --git a/skills/find-alternative-tools/SKILL.md b/skills/find-alternative-tools/SKILL.md index 6f82f94..d1d5324 100644 --- a/skills/find-alternative-tools/SKILL.md +++ b/skills/find-alternative-tools/SKILL.md @@ -1,6 +1,6 @@ --- name: find-alternative-tools -description: Given a named bioinformatics analysis step (e.g. "multiple sequence alignment", "somatic variant calling", "protein structure prediction", "single-cell demultiplexing"), find the credible alternative tools that could implement it, with pros/cons, license notes, typical compute requirements, maintenance status, and a ranked recommendation. Output is a structured list designed to feed directly into Nextflow subworkflow branching decisions. Use whenever a subworkflow is being scoped and needs multiple tool options, when asked to "list alternatives for X", "what could we use instead of Y", "what tools exist for Z", or as a subagent task inside the `build-nextflow-pipeline` flow at the alternative-tools step. Self-contained — needs only the analysis step and any constraints, no prior conversation context. +description: Given a named bioinformatics analysis step (e.g. "multiple sequence alignment", "somatic variant calling", "protein structure prediction", "single-cell demultiplexing"), find the credible alternative tools that could implement it, with pros/cons, license notes, typical compute requirements, maintenance status, and a ranked recommendation. Output is a structured comparison to inform tool selection; research does not authorize implementation of additional branches. Use whenever a subworkflow is being scoped and needs multiple tool options, when asked to "list alternatives for X", "what could we use instead of Y", "what tools exist for Z", or as a subagent task inside the `build-nextflow-pipeline` flow at the alternative-tools step. Self-contained — needs only the analysis step and any constraints, no prior conversation context. --- @@ -11,7 +11,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -23,7 +23,7 @@ You have been given the name of an analysis step. Your job is to produce a ranke ## Scope -The caller wants to turn "do MSA" into a subworkflow with `if/else` over a `msa_tool` parameter, with multiple real branches. That means you are *not* choosing one winner — you are enumerating every tool a reasonable pipeline author would consider exposing as an option, and giving the caller what they need to pick which branches to implement. +Compare credible tools for the requested analysis and constraints. Recommend one default and explain when alternatives are justified. The caller decides which candidate to use; implementing additional branches requires explicit user approval. An alternatives report is research, not a pipeline implementation plan. Err on the side of inclusion. A tool that is slightly dated but still published-in-papers might still belong on the list as a reproducibility option. Skip only tools that are: @@ -69,7 +69,7 @@ After the per-tool blocks, produce a ranked recommendation with reasoning, struc ## Parameter naming hint -Suggest the `enum` value set for the schema parameter (e.g. `msa_tool: enum [mafft, muscle, clustalo, tcoffee, hhblits]`). Use short, lowercase, conventional names — whatever the tool's own CLI command is, typically. +Suggest schema `enum` values only for branches explicitly approved for implementation. A research shortlist must not become the pipeline's advertised supported choices. Use short, lowercase, conventional tool names for approved choices. ## What to return diff --git a/skills/install-nextflow/SKILL.md b/skills/install-nextflow/SKILL.md index f5f6dc4..3d38792 100644 --- a/skills/install-nextflow/SKILL.md +++ b/skills/install-nextflow/SKILL.md @@ -11,7 +11,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. diff --git a/skills/launch-workflow/SKILL.md b/skills/launch-workflow/SKILL.md index d12a2a9..8f801c0 100644 --- a/skills/launch-workflow/SKILL.md +++ b/skills/launch-workflow/SKILL.md @@ -11,7 +11,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -125,3 +125,7 @@ pipeline; it does not determine the user's inputs or output destination. 6. **PIN the revision** — always use `-r` to target a specific branch, tag, or commit for reproducibility. 7. **USE cloud storage for `--outdir`** when the target CE runs on a cloud platform (s3://, gs://, az://). 8. **PRESENT the run URL** returned by `nextflow launch` so the user can monitor the run. + +## MCP connection reference + +When a Seqera connection is missing or operation discovery is unclear, use the shared connection reference. Otherwise rely on the live tool descriptions and returned schemas. Read [MCP connection](references/seqera-mcp/README.md) before proceeding. diff --git a/skills/launch-workflow/references/seqera-mcp/README.md b/skills/launch-workflow/references/seqera-mcp/README.md new file mode 100644 index 0000000..3ad3ac2 --- /dev/null +++ b/skills/launch-workflow/references/seqera-mcp/README.md @@ -0,0 +1,30 @@ +# Seqera MCP connection and discovery + +Use the plugin's configured Seqera MCP connection (`https://mcp.seqera.io/mcp`). +The host manages OAuth sign-in and credentials. Never paste tokens into prompts, +files or command examples. A missing connection is a capability gap, not a reason +to bypass authentication with curl or copied credentials. + +## Discover → execute → verify + +1. Inspect the tools actually exposed by the host. Their current descriptions + own API names, parameter schemas and authentication behavior. +2. Use `search_seqera_api` with the operation's intent. Read the returned full + schema, including optional fields, nesting and types; suggestions alone may + omit optional launch settings. Resolve workspace/resource IDs from returned + metadata rather than guessing. +3. Use `call_seqera_api` with the discovered service, exact `api_name` and + schema-shaped parameters. This is not a raw HTTP method/endpoint/body API. +4. For mutations, confirm the authorized scope and verify the resulting state + with an authoritative read. Broaden discovery or report a capability gap when + an operation is unavailable; do not fabricate names or mirror API schemas. + +For resume, discover the existing-workflow resume operation and preserve the +original launch/session relationship. A Platform workflow ID is not a Nextflow +session UUID. For saved-pipeline or ad-hoc launch, follow `launch-workflow`'s +relevant procedure and preserve the selected revision, parameters and lineage. + +Use exposed nf-core discovery helpers for module selection and inspect their +input/output contracts. Workspace execution, resource access and artifact +handoff remain host responsibilities; a tool response is not proof that a +container or pipeline ran successfully. diff --git a/skills/maintain-nf-core-pipeline/SKILL.md b/skills/maintain-nf-core-pipeline/SKILL.md index 1515546..6c362bb 100644 --- a/skills/maintain-nf-core-pipeline/SKILL.md +++ b/skills/maintain-nf-core-pipeline/SKILL.md @@ -20,7 +20,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -91,9 +91,9 @@ the entry workflow and project-owned workflow definitions. By this point the residue is genuinely pipeline-specific. If the residual work is a syntax migration: -- `nextflow-26-syntax` — strict-syntax rules for typed processes / channels -- `nf-v2-boolean-params` — boolean-param migration (common v2 failure) -- `nf-schema-migration` — schema updates required by v2 +- [strict syntax compatibility](../migrate-nextflow-code/references/nextflow-26-syntax/README.md) — strict-syntax rules for typed processes / channels +- [boolean parameter compatibility](../migrate-nextflow-code/references/nf-v2-boolean-params/README.md) — boolean-param migration (common v2 failure) +- [schema migration](../nextflow-schema/references/nf-schema-migration/README.md) — schema updates required by v2 For structural analysis of an unfamiliar pipeline before editing: - `nf-pipeline-design` diff --git a/skills/maintain-nf-core-pipeline/references/nf-core-conventions.md b/skills/maintain-nf-core-pipeline/references/nf-core-conventions.md index 252bcab..0cfec95 100644 --- a/skills/maintain-nf-core-pipeline/references/nf-core-conventions.md +++ b/skills/maintain-nf-core-pipeline/references/nf-core-conventions.md @@ -69,5 +69,5 @@ nf-core pipelines lint ## Tooling notes - nf-core ships with `prek` (Rust-based pre-commit replacement) as of tools 4.0. Run `prek install --overwrite` to migrate from `pre-commit`. -- Strict syntax is required for pipelines targeting tools ≥4.0. See `nextflow-26-syntax` for the rules. +- Strict syntax is required for pipelines targeting tools ≥4.0. See [strict syntax compatibility](../../migrate-nextflow-code/references/nextflow-26-syntax/README.md) for the rules. - `nf-core.yml` carries the `nf_core_version` field — that's the source of truth for which tools version the pipeline was last synced against. diff --git a/skills/maintain-nf-core-pipeline/references/template-merges/tools-4_0.md b/skills/maintain-nf-core-pipeline/references/template-merges/tools-4_0.md index 27223ea..dc25fad 100644 --- a/skills/maintain-nf-core-pipeline/references/template-merges/tools-4_0.md +++ b/skills/maintain-nf-core-pipeline/references/template-merges/tools-4_0.md @@ -43,7 +43,7 @@ Video: https://youtu.be/LBB9NueK-vk | `multiqc_config.yml` | Accept single-line YAML format — content is identical, only formatting changed. | | `modules.json` | Accept updated FastQC / MultiQC SHAs from template. Preserve entries for custom or non-template modules. | | `ro-crate-metadata.json` | Take all template changes — file is auto-generated, no manual content to preserve. | -| Workflow definitions | Accept strict-syntax reformatting. If pipeline has custom logic, ensure it still passes strict syntax — chain `nextflow-26-syntax` if not. | +| Workflow definitions | Accept strict-syntax reformatting. If pipeline has custom logic, ensure it still passes strict syntax — chain [strict syntax compatibility](../../../migrate-nextflow-code/references/nextflow-26-syntax/README.md) if not. | | Contribution guidance | Merge pipeline-specific guidance into the new template version and remove obsolete duplicates. | | `.pre-commit-config.yaml` | Accept template's `prek`-compatible config. Run `prek install --overwrite` after merging. | @@ -51,6 +51,6 @@ Video: https://youtu.be/LBB9NueK-vk - **Run `prek install --overwrite` after merge** to switch the repo's git hooks from `pre-commit` to `prek`. - **Webhook config migration is mandatory** — existing pipelines with Slack webhooks need to switch to the `nf-slack` plugin. The template removes the webhook section entirely; don't try to keep it. -- **Strict syntax is required**, not optional, for tools 4.0+. After merge, run `nextflow lint` and chain `nextflow-26-syntax` / `nf-v2-boolean-params` / `nf-schema-migration` if there are residual failures. +- **Strict syntax is required**, not optional, for tools 4.0+. After merge, run `nextflow lint` and chain [strict syntax compatibility](../../../migrate-nextflow-code/references/nextflow-26-syntax/README.md) / [boolean parameter compatibility](../../../migrate-nextflow-code/references/nf-v2-boolean-params/README.md) / [schema migration](../../../nextflow-schema/references/nf-schema-migration/README.md) if there are residual failures. - **No prefix-free `nf-core` commands** — any docs, scripts, or CI invoking `nf-core create`, `nf-core lint`, etc. must be updated to `nf-core pipelines create`, `nf-core pipelines lint`, etc. - **`--migrate-pytest` is gone**. If you still have pytest-based tests waiting to migrate to `nf-test`, do that conversion outside the sync PR. diff --git a/skills/migrate-from-snakemake/SKILL.md b/skills/migrate-from-snakemake/SKILL.md index 31b40b9..1e5db01 100644 --- a/skills/migrate-from-snakemake/SKILL.md +++ b/skills/migrate-from-snakemake/SKILL.md @@ -14,7 +14,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -78,7 +78,7 @@ Treat this as your spec. The rulegraph is your conversion roadmap — each node - Translate the main `Snakefile` into `main.nf` + `nextflow.config` skeleton. - Map global config and top-level DAG flow before implementing every rule detail. - Keep process stubs minimal but executable so the workflow compiles early. -- For non-trivial param surfaces: `triage-pipeline-parameters` before locking `nextflow.config`. +- For non-trivial param surfaces: [parameter triage](../nextflow-schema/references/triage-pipeline-parameters/README.md) before locking `nextflow.config`. ### 4) Decompose by responsibility diff --git a/skills/migrate-nextflow-code/SKILL.md b/skills/migrate-nextflow-code/SKILL.md index a5472b9..f7de98b 100644 --- a/skills/migrate-nextflow-code/SKILL.md +++ b/skills/migrate-nextflow-code/SKILL.md @@ -1,6 +1,6 @@ --- name: migrate-nextflow-code -description: Migrate Nextflow pipeline code to newer language requirements. Use when fixing strict syntax errors, replacing versions channels with topic channels, migrating from `publishDir` to workflow outputs (the `output {}` block), or adding static typing (typed processes/workflows, records, typed params). +description: Migrate Nextflow pipeline code while preserving behavior. Use for version upgrades including 25.04 compatibility, strict syntax errors, boolean CLI parameter types, topic channels, workflow outputs, and static typing (typed processes/workflows, records, typed params). --- @@ -11,7 +11,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -21,7 +21,7 @@ manages OAuth for the connected MCP server. Migrate Nextflow pipeline code to satisfy newer language requirements. Each migration is detection-driven: a tool reports what must change, you apply behavior-preserving fixes, then re-run the tool until it is clean. -**Requires Nextflow 26.04 or later** (for the `nextflow lint` command and the strict syntax parser, which is the default from 26.04 onward). +**Resolve the installed and target Nextflow versions first.** The modern examples target 26.04+, where strict syntax is the default. For a 25.04 target, read [25.04 compatibility](references/nf-migrate-25-04/README.md) and its scanners; do not silently upgrade the runtime or apply newer syntax. Check installed help/current official migration notes before using version-dependent features. **nf-core pipelines — check the template version before starting.** If the pipeline has a `.nf-core.yml`, check which version of nf-core/tools last generated its template. If `nf_core_version` is unspecified or less than 3.0.0, **stop**. Tell the user to upgrade their template first (`nf-core pipelines sync`) before attempting any code migrations. This will resolve syntax errors in the template code and provide a cleaner baseline. @@ -31,14 +31,16 @@ This SKILL.md is an **index**. Identify which migration the user needs from the | Migration | Use when the user… | Read this file | |-----------|--------------------|----------------| -| **Strict syntax** | …has strict syntax errors, or asks to run `nextflow lint` to find and fix errors | `strict-syntax.md` | +| **25.04 compatibility** | …targets 25.04 or crosses that release | [25.04 compatibility](references/nf-migrate-25-04/README.md) | +| **Boolean CLI params** | …has a string/boolean type mismatch or a flag that does not toggle | [boolean parameter compatibility](references/nf-v2-boolean-params/README.md) | +| **Strict syntax** | …has parser errors or asks to run `nextflow lint` | `strict-syntax.md`, plus [version-specific rules](references/nextflow-26-syntax/README.md) | | **Topic channels** | …wants to replace the `ch_versions` plumbing (or another channel threaded through every workflow) with a topic channel | `topic-channels.md` | | **Static typing** | …wants to add static types — typed process/workflow inputs and outputs, records (replacing tuples), or typed params | `static-typing.md` | | **Workflow outputs** | …wants to replace `publishDir` directives with workflow outputs — a top-level `output {}` block and a `publish:` section in the entry workflow | `workflow-outputs.md` | If the request matches no row, tell the user which migrations are currently supported rather than improvising. -If the request covers multiple migrations, recommend performing only the first matching migration in the table. The order is also a dependency order: strict syntax -> topic channels -> static typing -> workflow outputs. Do not try to perform multiple migrations at the same time. +For multiple requested migrations, agree a staged plan based on the target release and project dependencies. Establish a working baseline first, then complete one stage at a time with lint, representative tests and output comparisons. Strict syntax normally comes first; topic channels, types and workflow outputs need only be adopted when requested and supported. A green stage is the stopping point if the next cannot be verified. ## Critical Rules @@ -47,3 +49,15 @@ These hold regardless of which reference file you load. Each reference file adds 1. **Detect before editing** — follow the reference guidelines to determine what needs changing. Never guess. 2. **Preserve behavior** — a migration adapts code to new language requirements; it is not a refactor. Apply the smallest change that resolves each issue and leave unrelated logic alone. 3. **Verify** — run the project's tests (`nf-test test`, or `nextflow run -profile test,docker -resume`) to confirm behavior is unchanged before declaring the migration done. + +## Strict syntax compatibility reference + +When fixing v2 parser errors or planning staged modernization, consult the version-specific syntax rules and preserve a tested output baseline. Read [strict syntax compatibility](references/nextflow-26-syntax/README.md) before proceeding. + +## Boolean parameter compatibility reference + +When CLI boolean flags arrive with the wrong type or do not toggle under strict syntax, check the typed-parameter and schema contract. Read [boolean parameter compatibility](references/nf-v2-boolean-params/README.md) before proceeding. + +## Nextflow 25.04 compatibility reference + +When targeting 25.04 or diagnosing compatibility across that release, use its changelog and scanners without assuming 26.x features. Read [25.04 compatibility](references/nf-migrate-25-04/README.md) before proceeding. diff --git a/skills/nextflow-26-syntax/SKILL.md b/skills/migrate-nextflow-code/references/nextflow-26-syntax/README.md similarity index 93% rename from skills/nextflow-26-syntax/SKILL.md rename to skills/migrate-nextflow-code/references/nextflow-26-syntax/README.md index 41f3e1d..d34fe9e 100644 --- a/skills/nextflow-26-syntax/SKILL.md +++ b/skills/migrate-nextflow-code/references/nextflow-26-syntax/README.md @@ -1,14 +1,3 @@ ---- -name: nextflow-26-syntax -description: > - Migrate, write, or debug Nextflow workflows under the v2 strict-syntax - parser used by Nextflow 26+. Use for NXF_SYNTAX_PARSER=v2 issues, - typed params blocks, process input/output type annotations, implicit - it errors, mixed declarations, nextflow inspect, or preview/compile - failures. Also use for staged modernization of an existing pipeline to - 26.04+ — publishDir to workflow output blocks, static types, and - tuple-to-record channel migration. ---- ## Using this skill @@ -18,7 +7,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../../../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -339,10 +328,10 @@ nextflow inspect 2>&1 ## Related Skills -- `nf-v2-boolean-params` — focused deep-dive on boolean CLI params under strict syntax. **Load this skill alone for general v2 migration; pair with `nf-v2-boolean-params` when the task also involves a boolean flag that's not toggling.** +- [boolean parameter compatibility](../nf-v2-boolean-params/README.md) — read the boolean compatibility reference when the task also involves a flag that is not toggling; otherwise keep the syntax investigation scoped to the observed parser errors. - `nf-pipeline-design` — typed process/workflow rules and the workflow `output {}` block in new code - `maintain-nf-core-pipeline` — when the pipeline being migrated is an nf-core pipeline (template sync and module updates come first) -- `nf-test` / `repair-nf-test` — regression tests between migration stages +- `nf-test` / [nf-test failure repair](../../../nf-test/references/repair-nf-test/README.md) — regression tests between migration stages ## References diff --git a/skills/nf-migrate-25-04/SKILL.md b/skills/migrate-nextflow-code/references/nf-migrate-25-04/README.md similarity index 86% rename from skills/nf-migrate-25-04/SKILL.md rename to skills/migrate-nextflow-code/references/nf-migrate-25-04/README.md index 1e58e24..855bbd5 100644 --- a/skills/nf-migrate-25-04/SKILL.md +++ b/skills/migrate-nextflow-code/references/nf-migrate-25-04/README.md @@ -1,11 +1,3 @@ ---- -name: nf-migrate-25-04 -description: > - Migrate Nextflow pipelines to 25.04. Covers breaking changes, deprecations, - workflow outputs v3, strict syntax, and new features. Use when upgrading - pipelines, fixing 25.04 compatibility, or adopting data lineage, topic - channels, or `nextflow lint`. ---- ## Using this skill @@ -15,7 +7,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../../../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -23,19 +15,19 @@ manages OAuth for the connected MCP server. # Nextflow 25.04 Migration -Full upstream changelog: `upstream-25-04.md` +Full upstream changelog: [25.04 release notes](references/upstream-25-04.md). This reference applies to that target release; verify version-dependent commands against installed help. ## Quick Start — Scan for Issues Run the comprehensive scanner on any pipeline directory: If available, use the bundled `find_deprecated_patterns.py` helper to inspect -the user-provided source files with the host's execution tools. +the user-provided source files with the host's execution tools: [deprecated-pattern scanner](scripts/find_deprecated_patterns.py). Checks for: deprecated `shell` blocks, unnecessary `nextflow.preview.topic` flags, workflow output v2 `>>` syntax, and `-with-weblog` usage. -For shell blocks only, use the bundled `find_shell_blocks.py` helper if available. +For shell blocks only, use the [shell-block scanner](scripts/find_shell_blocks.py). Both scripts exit 0 if clean, 1 if issues found. @@ -153,5 +145,5 @@ plugins { ### 5. New Config Options -See `upstream-25-04.md` § Miscellaneous for the full list. +See [25.04 release notes](references/upstream-25-04.md) § Miscellaneous for the full list. Relevant only if using specific cloud executors (AWS Batch, Azure Batch, Google Batch, Fusion). diff --git a/skills/nf-migrate-25-04/references/upstream-25-04.md b/skills/migrate-nextflow-code/references/nf-migrate-25-04/references/upstream-25-04.md similarity index 100% rename from skills/nf-migrate-25-04/references/upstream-25-04.md rename to skills/migrate-nextflow-code/references/nf-migrate-25-04/references/upstream-25-04.md diff --git a/skills/nf-migrate-25-04/scripts/find_deprecated_patterns.py b/skills/migrate-nextflow-code/references/nf-migrate-25-04/scripts/find_deprecated_patterns.py similarity index 100% rename from skills/nf-migrate-25-04/scripts/find_deprecated_patterns.py rename to skills/migrate-nextflow-code/references/nf-migrate-25-04/scripts/find_deprecated_patterns.py diff --git a/skills/nf-migrate-25-04/scripts/find_shell_blocks.py b/skills/migrate-nextflow-code/references/nf-migrate-25-04/scripts/find_shell_blocks.py similarity index 100% rename from skills/nf-migrate-25-04/scripts/find_shell_blocks.py rename to skills/migrate-nextflow-code/references/nf-migrate-25-04/scripts/find_shell_blocks.py diff --git a/skills/nf-v2-boolean-params/SKILL.md b/skills/migrate-nextflow-code/references/nf-v2-boolean-params/README.md similarity index 88% rename from skills/nf-v2-boolean-params/SKILL.md rename to skills/migrate-nextflow-code/references/nf-v2-boolean-params/README.md index ee08058..b12f918 100644 --- a/skills/nf-v2-boolean-params/SKILL.md +++ b/skills/migrate-nextflow-code/references/nf-v2-boolean-params/README.md @@ -1,12 +1,3 @@ ---- -name: nf-v2-boolean-params -description: > - Handle boolean parameters correctly in Nextflow v2 strict syntax. - Use when writing or migrating Nextflow workflows with Boolean params, - debugging "Value is [string] but should be [boolean]", fixing truthy - string flags, or when --flag true/false behaves differently under - NXF_SYNTAX_PARSER=v2 / Nextflow 26+. ---- ## Using this skill @@ -16,7 +7,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../../../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -219,5 +210,5 @@ If using the `nf-schema` plugin (`validateParameters()`), be aware: ## Related Skills -- `nextflow-26-syntax` — broader v2 parser rules (type annotations on process I/O, implicit `it`, top-level statements vs declarations, emit labels). **Load together with this skill when the task touches multiple v2 grammar rules; load this one alone when the failure is specifically about a boolean CLI param.** -- `nf-debug` — Pipeline diagnostics with lint, config validation, and preview +- [strict syntax compatibility](../nextflow-26-syntax/README.md) — broader v2 parser rules (type annotations on process I/O, implicit `it`, top-level statements vs declarations, emit labels). Read the syntax compatibility reference when the task touches multiple grammar rules; keep boolean-only failures scoped to this reference. +- [static diagnostics](../../../repair-workflow/references/nf-debug/README.md) — Pipeline diagnostics with lint, config validation, and preview diff --git a/skills/nextflow-config/SKILL.md b/skills/nextflow-config/SKILL.md index c9add03..ba438cc 100644 --- a/skills/nextflow-config/SKILL.md +++ b/skills/nextflow-config/SKILL.md @@ -14,7 +14,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. diff --git a/skills/nextflow-development/SKILL.md b/skills/nextflow-development/SKILL.md index d939a37..20be7e2 100644 --- a/skills/nextflow-development/SKILL.md +++ b/skills/nextflow-development/SKILL.md @@ -11,7 +11,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. diff --git a/skills/nextflow-history/SKILL.md b/skills/nextflow-history/SKILL.md index c003221..1ed2f3c 100644 --- a/skills/nextflow-history/SKILL.md +++ b/skills/nextflow-history/SKILL.md @@ -5,6 +5,7 @@ description: > recent local runs, wants to see what pipelines they've executed, understand run lineage, inspect the Nextflow cache, or correlate runs with work directories. Uses run history, task cache metadata, and Nextflow logs supplied by the user. + Also use for narrative recaps, recurring failures and pipeline evolution. --- @@ -15,7 +16,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -36,7 +37,7 @@ not assume a working directory or cache location. - Identify safe cleanup candidates after reviewing the user's retention needs. For failure diagnosis, use the `debug-local-run` skill. For Platform history, -use `seqera-mcp` to discover the relevant workflow-listing operation. +use MCP discovery/execution to retrieve workflows; read [MCP connection](../launch-workflow/references/seqera-mcp/README.md) if connection or discovery guidance is needed. ## Run-history fields @@ -104,6 +105,8 @@ only within the user's authorized retention and cleanup scope. ## Reporting +For a narrative recap or recurring patterns, read [narrative run-history analysis](references/nf-run-history/README.md). First establish the selected environment, time range and completeness of the records. Use logs/trace evidence to distinguish confirmed causes from correlations. + Lead with the observed run count, success/failure status, and requested time range. Include the selected pipeline versions and identifiers when useful. Explain cache reuse or cleanup implications from the actual evidence. Distinguish @@ -111,4 +114,8 @@ historical failures from current failures and avoid presenting stale logs as the latest run. Related skills: `nextflow-config`, `debug-local-run`, -`debug-seqera-failed-run`, and `seqera-mcp`. +`debug-seqera-failed-run`, and [MCP connection](../launch-workflow/references/seqera-mcp/README.md). + +## Narrative history analysis + +When the user wants a recap, recurring failure patterns or how a pipeline evolved over time, analyze the selected records and explain gaps without inferring causality from timing alone. Read [narrative run-history analysis](references/nf-run-history/README.md) before proceeding. diff --git a/skills/nf-run-history/SKILL.md b/skills/nextflow-history/references/nf-run-history/README.md similarity index 87% rename from skills/nf-run-history/SKILL.md rename to skills/nextflow-history/references/nf-run-history/README.md index 625b82a..3c4af66 100644 --- a/skills/nf-run-history/SKILL.md +++ b/skills/nextflow-history/references/nf-run-history/README.md @@ -1,11 +1,3 @@ ---- -name: nf-run-history -description: > - Analyze local Nextflow run history to give the user a narrative summary of what - they've been doing — patterns, progress, recurring issues, and evolution over time. - Use when the user asks what they've been running, how a pipeline has been going, - or wants a recap of recent activity. ---- ## Using this skill @@ -15,7 +7,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../../../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. diff --git a/skills/nextflow-output-patterns/SKILL.md b/skills/nextflow-output-patterns/SKILL.md index 8612a04..f8bae6e 100644 --- a/skills/nextflow-output-patterns/SKILL.md +++ b/skills/nextflow-output-patterns/SKILL.md @@ -11,7 +11,7 @@ description: > merging, combined output files, metadata-keyed grouping, optional tuple positions, and the broader category of "the workflow finishes without error but the merged output is malformed." Pair with - `nextflow-26-syntax` (strict v2 syntax) and `create-workflow` + migrate-nextflow-code (strict v2 syntax) and build-nextflow-pipeline (high-level structure and module composition); this skill is specifically about output-correctness idioms in the operator layer. --- @@ -24,7 +24,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -127,5 +127,5 @@ ch_files // tuple val(sample), val(condition), path(file) ## When this skill is NOT enough - For `splitFasta`, `splitText`, `splitCsv` (the *input* side of file-channel work), consult the Nextflow docs (the host's web tools restricted to official https://docs.seqera.io/nextflow/ documentation). -- For `collectFile`'s `storeDir:` / `cache:` / `sort:` parameters (publishing, deduplication), see `create-workflow` § "publishing outputs". -- For metadata-channel shape design (when meta has multiple keys), see `create-workflow` § "metadata flow". +- For `collectFile`'s `storeDir:` / `cache:` / `sort:` parameters, consult the current official Nextflow operator reference. +- For metadata-channel shape design (when meta has multiple keys), use `nf-pipeline-design`. diff --git a/skills/nextflow-schema/SKILL.md b/skills/nextflow-schema/SKILL.md index 1c5f2b9..28de469 100644 --- a/skills/nextflow-schema/SKILL.md +++ b/skills/nextflow-schema/SKILL.md @@ -5,7 +5,8 @@ description: > and sample sheet schema files for Nextflow pipelines. Use when user asks to create, update, or validate a pipeline parameter schema or sample sheet schema. Covers type inference, parameter grouping, nf-core conventions, Launchpad minimal-form guidance, - and nf-schema v2 (JSON Schema 2020-12) compliance. + nf-schema v2 (JSON Schema 2020-12) compliance, source-material parameter triage, + and migration from nf-validation or draft-07 schemas. --- @@ -16,7 +17,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -39,6 +40,8 @@ Load this skill when the user wants to: ## Discovering parameters from raw source material +Read [parameter triage](references/triage-pipeline-parameters/README.md) for the bounded source-audit task, including the config outline and representative test-input manifest. + When given source material (scripts, notebooks, paper methods sections, CLI docs) rather than an existing `nextflow.config`, scan exhaustively before writing the schema. Missing a parameter now means a breaking change to surface it later. ### What to scan @@ -328,4 +331,12 @@ For `schema_input.json`: ## Migration -For migrating existing pipelines from nf-validation to nf-schema, see the `nf-schema-migration` skill. +For migrating existing pipelines from nf-validation to nf-schema, read [schema migration](references/nf-schema-migration/README.md) before editing. Schema syntax validation alone does not prove samplesheet or pipeline equivalence. + +## Source-material parameter triage + +When deriving parameters from scripts, notebooks, papers or CLI documentation, produce the source audit, schema, config outline and representative test-input manifest. Read [parameter triage](references/triage-pipeline-parameters/README.md) before proceeding. + +## Legacy schema migration + +When upgrading nf-validation or draft-07 schemas, preserve validation, samplesheet tuple shape, help behavior and representative execution. Read [schema migration](references/nf-schema-migration/README.md) before proceeding. diff --git a/skills/nf-schema-migration/SKILL.md b/skills/nextflow-schema/references/nf-schema-migration/README.md similarity index 91% rename from skills/nf-schema-migration/SKILL.md rename to skills/nextflow-schema/references/nf-schema-migration/README.md index 04500b2..80c4db7 100644 --- a/skills/nf-schema-migration/SKILL.md +++ b/skills/nextflow-schema/references/nf-schema-migration/README.md @@ -1,10 +1,3 @@ ---- -name: nf-schema-migration -description: > - Migrate Nextflow pipelines from nf-validation to nf-schema v2. - Trigger: "migrate to nf-schema", "update from nf-validation", - "upgrade schema", "nf-validation to nf-schema", "draft-07 to 2020-12". ---- ## Using this skill @@ -14,7 +7,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../../../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -101,4 +94,4 @@ samplesheetToList returns a list. Construct the channel from that list using the - Help behavior is correct. - The user's representative validation and pipeline test pass. -Consult the bundled migration-guide.md reference for additional migration details. +Consult [migration details](references/migration-guide.md) for legacy keyword examples. This is a historical reference: verify current nf-core tooling compatibility rather than treating its dated support warning as current. diff --git a/skills/nf-schema-migration/references/migration-guide.md b/skills/nextflow-schema/references/nf-schema-migration/references/migration-guide.md similarity index 100% rename from skills/nf-schema-migration/references/migration-guide.md rename to skills/nextflow-schema/references/nf-schema-migration/references/migration-guide.md diff --git a/skills/triage-pipeline-parameters/SKILL.md b/skills/nextflow-schema/references/triage-pipeline-parameters/README.md similarity index 80% rename from skills/triage-pipeline-parameters/SKILL.md rename to skills/nextflow-schema/references/triage-pipeline-parameters/README.md index 78c13fd..5bd5ee6 100644 --- a/skills/triage-pipeline-parameters/SKILL.md +++ b/skills/nextflow-schema/references/triage-pipeline-parameters/README.md @@ -1,7 +1,3 @@ ---- -name: triage-pipeline-parameters -description: Given source material for a Nextflow pipeline in progress (scripts, repository, Jupyter/R notebook, paper methods section, tool CLI docs), extract every knob that has an observable effect on output, triage each into top-level parameter vs. pinned internal constant vs. profile override, produce a drafted `nextflow_schema.json` with a companion `nextflow.config` skeleton, and as a secondary output identify a minimal representative test input per heavy tool that the container-build phase will consume. Use whenever you are handed source material and asked to "identify the parameters", "draft the schema", "figure out what should be user-facing", or when working as a subagent inside the `create-workflow` planning flow at the parameter-surface step. Designed for subagent invocation — the task is fully self-contained given the source material; no prior conversation context is needed. ---- ## Using this skill @@ -11,7 +7,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../../../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. diff --git a/skills/nf-data-lineage/SKILL.md b/skills/nf-data-lineage/SKILL.md index e02318e..db50dc6 100644 --- a/skills/nf-data-lineage/SKILL.md +++ b/skills/nf-data-lineage/SKILL.md @@ -15,7 +15,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -192,5 +192,5 @@ Previous runs without lineage enabled cannot be retroactively tracked. ## Related Skills - `debug-local-run` — for debugging failures (uses work dir, not lineage store) -- `nf-run-history` — for run history narrative (uses run-history metadata) +- [narrative run-history analysis](../nextflow-history/references/nf-run-history/README.md) — for run history narrative (uses run-history metadata) - `nextflow-config` — for configuring lineage settings diff --git a/skills/nf-docker-scripts/SKILL.md b/skills/nf-docker-scripts/SKILL.md index 98abf2d..14cc414 100644 --- a/skills/nf-docker-scripts/SKILL.md +++ b/skills/nf-docker-scripts/SKILL.md @@ -16,7 +16,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -311,6 +311,6 @@ When the user asks about Docker + scripts, follow this flow: ## Related Skills - `create-container` — Wave/conda container provisioning -- `create-workflow` — composing workflows from modules -- `convert-python-script` — converting Python scripts to Nextflow processes +- [registry composition](../build-nextflow-pipeline/references/create-workflow/README.md) — composing workflows from modules +- [Python conversion](../build-nextflow-pipeline/references/convert-python-script/README.md) — converting Python scripts to Nextflow processes - `nf-pipeline-design` — understanding pipeline layout including shared helper commands diff --git a/skills/nf-pipeline-design/SKILL.md b/skills/nf-pipeline-design/SKILL.md index ecf1d40..5d910ec 100644 --- a/skills/nf-pipeline-design/SKILL.md +++ b/skills/nf-pipeline-design/SKILL.md @@ -23,7 +23,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -37,7 +37,7 @@ When a structural decision depends on a non-structural one, chain to: - `find-alternative-tools` — tool choice at a branch - `search-existing-modules` — reuse vs author a module -- `triage-pipeline-parameters` — param schema before `main.nf` +- [parameter triage](../nextflow-schema/references/triage-pipeline-parameters/README.md) — param schema before `main.nf` ## Canonical Nextflow baseline diff --git a/skills/nf-plugin-development/SKILL.md b/skills/nf-plugin-development/SKILL.md index 281ced5..a3a6553 100644 --- a/skills/nf-plugin-development/SKILL.md +++ b/skills/nf-plugin-development/SKILL.md @@ -15,7 +15,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. diff --git a/skills/nf-plugin-legacy-migration/SKILL.md b/skills/nf-plugin-legacy-migration/SKILL.md index 4769001..277c3f4 100644 --- a/skills/nf-plugin-legacy-migration/SKILL.md +++ b/skills/nf-plugin-legacy-migration/SKILL.md @@ -15,7 +15,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. diff --git a/skills/nf-test/SKILL.md b/skills/nf-test/SKILL.md index 1543b53..2317660 100644 --- a/skills/nf-test/SKILL.md +++ b/skills/nf-test/SKILL.md @@ -11,7 +11,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -122,7 +122,7 @@ Use only profiles available in the user's configuration. Narrow execution to the Inspect the work artifacts and logs reported by nf-test using available host tools. For a failed task, inspect .command.sh, .command.log, and .command.err from the actual task reported by the test. Do not assume their locations. -Treat failures as evidence. Check missing inputs, tuple shape, profile availability, container access, resource requirements, and actual assertion differences before changing pipeline logic. +Treat failures as evidence. Read [nf-test failure repair](references/repair-nf-test/README.md) to distinguish regression from an intentional contract change. Check missing inputs, tuple shape, profile availability, container access, resource requirements, and actual assertion differences before changing pipeline logic. ## Setup, Cleanup, and CI @@ -134,4 +134,8 @@ In CI, reproduce the required Nextflow, nf-test, plugin, container, and profile Consult plugins.md, nft-utils.md, assertions.md, test-data.md, and troubleshooting.md by name when the host makes them available. -Use repair-nf-test for structured diagnosis of existing failures. +For failing suites, assertion errors or snapshot mismatches, read [nf-test failure repair](references/repair-nf-test/README.md) before changing code or expectations. Preserve fixtures unless a reviewed intentional contract change justifies updating them. + +## Failure repair playbook + +When an existing nf-test fails, classify intentional contract change, regression, nondeterminism or infrastructure before editing code, assertions or snapshots. Read [nf-test failure repair](references/repair-nf-test/README.md) before proceeding. diff --git a/skills/repair-nf-test/SKILL.md b/skills/nf-test/references/repair-nf-test/README.md similarity index 94% rename from skills/repair-nf-test/SKILL.md rename to skills/nf-test/references/repair-nf-test/README.md index 0d13215..0093d4d 100644 --- a/skills/repair-nf-test/SKILL.md +++ b/skills/nf-test/references/repair-nf-test/README.md @@ -1,12 +1,3 @@ ---- -name: repair-nf-test -description: > - Debug and fix failing nf-test suites using structured, evidence-based reasoning. - Use when the user reports failing nf-tests, snapshot mismatches, assertion errors, - or asks to fix/debug/repair their nf-test suite. Trigger phrases include "fix nf-test", - "nf-test failing", "snapshot mismatch", "test assertion failed", "debug test failure", - "repair nf-test", "fix my tests", "tests are broken". ---- ## Using this skill @@ -16,7 +7,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../../../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -92,7 +83,7 @@ Evidence patterns: - An output channel was renamed or restructured → snapshot keys change - A new output was added → snapshot gains new entries -Action: update the snapshot or assertion to match the new correct behavior. +Action: update the snapshot or assertion only after checking the intentional contract change against independent expected behavior. Select the affected test using the project's supported selector before passing `--update-snapshot`; the command below shows the flag, not a suite-wide update instruction. ```bash nf-test test --update-snapshot diff --git a/skills/repair-workflow/SKILL.md b/skills/repair-workflow/SKILL.md index 273663e..af89554 100644 --- a/skills/repair-workflow/SKILL.md +++ b/skills/repair-workflow/SKILL.md @@ -4,6 +4,7 @@ description: > Repair or debug an existing Nextflow workflow or pipeline. Use when the user asks to fix, debug, or improve an existing workflow, especially when choosing the right validation loop matters more than writing new workflow structure. + Also use for pipeline lint, config validation and preview/compilation diagnostics. --- @@ -14,7 +15,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -22,10 +23,12 @@ manages OAuth for the connected MCP server. # Repair Existing Nextflow Workflows -Repair the user's existing workflow in place. Work with the files, modules, tests, and validation commands the user supplies rather than assuming a repository layout. +Diagnose or repair the user's existing workflow in place. Work with the supplied files, modules, tests and validation commands rather than assuming a repository layout. A diagnosis or lint request authorizes inspection and reporting, not automatic source edits. ## Choose the Validation Loop +For syntax/config/compilation failures, read [static diagnostics](references/nf-debug/README.md). For executed failures, use `debug-local-run` or `debug-seqera-failed-run`; for test expectations, use `nf-test`. Static diagnostics supplement representative execution and cannot prove output correctness. + Run the existing verifier or affected nf-test target early. If the project explicitly requires nf-core linting, use its required lint command and metadata. For channel-shape bugs, inspect representative tuples before changing operators. Check current official Nextflow documentation before changing operator, channel, or output semantics: @@ -89,4 +92,8 @@ Reread the test output, inspect the actual produced artifacts, compare expected - No shadow implementation or copy-back workaround was introduced. - The representative test passes, or any remaining limitation is reported precisely. -Use create-workflow for new workflows, run-module for a single registry module, nextflow-26-syntax for strict-syntax changes, and repair-nf-test for test-specific failures. Consult repair-checklists.md when available. +Use [registry composition](../build-nextflow-pipeline/references/create-workflow/README.md) for new workflows, run-module for a single registry module, [strict syntax compatibility](../migrate-nextflow-code/references/nextflow-26-syntax/README.md) for strict-syntax changes, and [nf-test failure repair](../nf-test/references/repair-nf-test/README.md) for test-specific failures. Consult repair-checklists.md when available. + +## Static diagnostics playbook + +When the request concerns lint, config validation, compilation or why a pipeline will not start, use static diagnostics and honor whether the user requested diagnosis or repair. Read [static diagnostics](references/nf-debug/README.md) before proceeding. diff --git a/skills/nf-debug/SKILL.md b/skills/repair-workflow/references/nf-debug/README.md similarity index 66% rename from skills/nf-debug/SKILL.md rename to skills/repair-workflow/references/nf-debug/README.md index c6bebaa..79b8186 100644 --- a/skills/nf-debug/SKILL.md +++ b/skills/repair-workflow/references/nf-debug/README.md @@ -1,11 +1,3 @@ ---- -name: nf-debug -description: > - Debug Nextflow pipelines with lint, config validation, and preview compilation. - Use when asked to "debug pipeline", "check my pipeline", "lint nextflow", - "validate pipeline", "why won't my pipeline run", "pipeline diagnostics", - or "check pipeline syntax". ---- ## Using this skill @@ -15,7 +7,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../../../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -23,7 +15,7 @@ manages OAuth for the connected MCP server. # Nextflow Pipeline Debugger -Run three diagnostic passes, fix issues found, re-run until clean. +Run supported diagnostic passes and report evidence. Apply fixes only when the user's request authorizes repair, then re-run the affected checks. Check the installed Nextflow version/help before using version-dependent commands. ## Diagnostic Steps @@ -41,7 +33,7 @@ Catches syntax errors, deprecated patterns, undeclared variables. nextflow config -show-profiles ``` -Validates config files merge correctly. Look for unresolved params, profile conflicts, duplicate keys. +Lists available profiles. Inspect the merged configuration for the selected pipeline/profile separately to diagnose unresolved parameters, profile conflicts and duplicate settings. Profile listing alone does not prove the intended configuration is correct. ### 3. Preview (DAG compilation) @@ -55,9 +47,9 @@ Compiles the pipeline and generates the DAG without executing. Surfaces channel 1. Run all three commands, collect output. 2. Analyze errors — group by file and severity. -3. Fix issues directly in source files. +3. Report the diagnosis; if repair was requested, make the smallest evidence-based source edit. 4. Re-run the failing diagnostic to confirm the fix. -5. Repeat until all three pass clean. +5. Report which supported checks passed, failed or could not run. For a repair, run representative tests/output checks as well; static success is not runtime verification. ## Common Fixes diff --git a/skills/repair-workflow/references/repair-checklists.md b/skills/repair-workflow/references/repair-checklists.md index fbea8dc..674fe2a 100644 --- a/skills/repair-workflow/references/repair-checklists.md +++ b/skills/repair-workflow/references/repair-checklists.md @@ -54,7 +54,7 @@ Use this when: - errors mention strict syntax, parser v2, missing type annotation, or unexpected token Preferred loop: -1. load `nextflow-26-syntax` +1. load [strict syntax compatibility](../../migrate-nextflow-code/references/nextflow-26-syntax/README.md) 2. repair parser issues directly 3. rerun the relevant Nextflow lint or test command diff --git a/skills/run-module/SKILL.md b/skills/run-module/SKILL.md index a1e6a3a..aad186f 100644 --- a/skills/run-module/SKILL.md +++ b/skills/run-module/SKILL.md @@ -11,7 +11,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. diff --git a/skills/search-existing-modules/SKILL.md b/skills/search-existing-modules/SKILL.md index 5720234..e258a33 100644 --- a/skills/search-existing-modules/SKILL.md +++ b/skills/search-existing-modules/SKILL.md @@ -11,7 +11,7 @@ description: > new module). Use whenever a subworkflow is being scoped and needs to decide whether to reuse an existing Nextflow module or write a new one, or as a subagent task during the `nf-pipeline-design` / - `create-workflow` flow. Self-contained — needs only the tool name and + build-nextflow-pipeline flow. Self-contained — needs only the tool name and optionally the source repo path, no prior conversation context. --- @@ -23,7 +23,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. diff --git a/skills/seqera-data-links/SKILL.md b/skills/seqera-data-links/SKILL.md index 0c6410a..299ff4f 100644 --- a/skills/seqera-data-links/SKILL.md +++ b/skills/seqera-data-links/SKILL.md @@ -14,7 +14,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. @@ -29,7 +29,7 @@ print, or copy access tokens, bearer headers, cloud keys, or credential contents ## Discover before calling -Use the `seqera-mcp` skill for the connection and discovery pattern. Every +Read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference for discovery and authentication. Every Platform operation follows: 1. Call `search_seqera_api` with the operation's intent, such as "list data links diff --git a/skills/seqera-mcp/SKILL.md b/skills/seqera-mcp/SKILL.md deleted file mode 100644 index 47e7894..0000000 --- a/skills/seqera-mcp/SKILL.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -name: seqera-mcp -description: > - Nextflow Platform tools via MCP (Model Context Protocol). Use for structured - operations on workflows, pipelines, compute envs, datasets, and data links, - including resuming a failed Platform run. ---- - - -## Using this skill - -Use the tools and runtimes available in the user's session. Establish the -pipeline, input data and execution environment from their request or current -context. Use user-selected locations for files and results. Consult companion -skills, bundled references and optional helpers by name when available. - -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples -describe API operations. Discover their exact names and parameter schemas with -`search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host -manages OAuth for the connected MCP server. - - -# Seqera MCP Skill - -Access Nextflow Platform, Wave, and SeqeraHub -through the MCP server. Connect to https://mcp.seqera.io/mcp using the host's OAuth sign-in. -The host manages credentials; never paste or package access tokens. - -## When to Use - -Load this skill for any Platform read or mutation: listing workspaces, -fetching workflow details, launching pipelines, creating credentials, -managing data links and claiming Wave containers. Use the connected MCP tools -for these operations so the host manages Platform authentication. - -## What's Loaded - -The production MCP server is configured in the plugin's mcp.json. -After connecting, inspect the tools actually exposed by the host. This skill -uses the following five tools; authenticated live discovery is authoritative. -If a required tool is unavailable, report the connection or capability gap: - -**Seqera API (Platform / Wave / SeqeraHub):** -- `search_seqera_api(query, service_filter?, limit?)` — natural-language - search; returns ranked `api_name`s with parameter schemas and - `suggested_parameters`. -- `call_seqera_api(service, api_name, parameters)` — executes the - chosen `api_name`. `service` is one of `platform`, `wave`, - `seqerahub`. - -**nf-core helpers:** -- `search_nfcore_module(query, limit?)` -- `describe_nfcore_module(module_name)` — returns module inputs, outputs, and metadata. - Verify command examples against the current native module workflow before use -- `nfcore_suggest_analysis(library_strategy?, organism?)` - -## Workflow: search → call - -Always discover first, then call with the exact `api_name`: - -``` -search_seqera_api(query="list workflows in my workspace") - → suggestion: {service: "platform", - api_name: "platform_list_workflows", - suggested_parameters: {workspaceId: 0, max: 50, ...}} - -call_seqera_api(service="platform", - api_name="platform_list_workflows", - parameters={"workspaceId": 12345, "max": 10}) -``` - -Use the exact `api_name` from search results — do not invent, translate, -or shorten it. - -## Parameter Shape (Common Pitfall) - -`parameters` must use the exact camelCase field names and nesting from the -selected API's full `parameters` schema. The `suggested_parameters` template -contains required fields only, so inspect the full schema before adding optional -fields. For example, pipeline launch changes belong under -`{"pipelineId": 999, "workspaceId": 12345, "launch": {"revision": "master"}}`; -do not flatten `revision` beside `pipelineId`. - -Do not pass a raw HTTP method, endpoint, and body object. That shape will be rejected — the MCP server handles -HTTP construction internally. - -## When Search Doesn't Find It - -If `search_seqera_api` doesn't surface a relevant suggestion, broaden -the query (use the user's wording, not your guess at an endpoint -name). Only call `call_seqera_api` with an `api_name` you've seen in a -search result — fabricated names will fail. - -## Resume a failed Platform run - -When the user asks to resume an existing run, search for -`platform_resume_workflow` and call it with the original `workflowId` -and `workspaceId`. That tool looks up the Nextflow session UUID, copies -the saved launch, and names the new run `original_2`, `original_3`, and -so on — matching the Platform UI. - -Do not pass a Platform workflow ID as `sessionId`. Do not omit `runName` -on `platform_launch_workflow` and let Platform invent `adjective_noun` -names. Prefer `platform_resume_workflow` over `resume: true` on the -generic launch tools. - -## References - -`tool-schemas.md` — worked parameter examples for common -`api_name`s. Load via the host's file-reading tool if you need a concrete shape -before calling `call_seqera_api`. diff --git a/skills/seqera-mcp/references/tool-schemas.md b/skills/seqera-mcp/references/tool-schemas.md deleted file mode 100644 index 57c7524..0000000 --- a/skills/seqera-mcp/references/tool-schemas.md +++ /dev/null @@ -1,255 +0,0 @@ - -# MCP Tool Parameter Schemas - -Worked examples of the parameter shapes `call_seqera_api` accepts. Always -discover the exact `api_name` and parameter schema via `search_seqera_api` -first; the names below are illustrative, not exhaustive. - -## Shape Rule - -`parameters` uses the exact camelCase field names and nesting from the selected -API's full `parameters` schema. The `suggested_parameters` template contains -required fields only and can omit optional nested objects such as `launch`. -It is NOT a raw HTTP payload — do not pass `{method, endpoint, body}`. The MCP -layer constructs the HTTP request server-side from the `api_name`. - -`workspaceId` is the integer ID of the user's workspace. If you don't -have one yet, discover the appropriate workspace-listing operation with `search_seqera_api` before calling -anything else — the examples below use `12345` only as a placeholder. - -## Platform — Workflows - -### `platform_list_workflows` -```json -{ - "service": "platform", - "api_name": "platform_list_workflows", - "parameters": { - "workspaceId": 12345, - "max": 50, - "offset": 0, - "search": "rnaseq", - "status": "SUCCEEDED" - } -} -``` - -### `platform_get_workflow` -```json -{ - "service": "platform", - "api_name": "platform_get_workflow", - "parameters": { - "workflowId": "abc123", - "workspaceId": 12345 - } -} -``` - -### `platform_resume_workflow` -```json -{ - "service": "platform", - "api_name": "platform_resume_workflow", - "parameters": { - "workflowId": "abc123", - "workspaceId": 12345 - } -} -``` - -### `platform_launch_workflow` -```json -{ - "service": "platform", - "api_name": "platform_launch_workflow", - "parameters": { - "workspaceId": 12345, - "computeEnvId": "ce123", - "pipeline": "nf-core/rnaseq", - "revision": "3.12.0", - "workDir": "", - "paramsText": "{\"input\": \"\", \"outdir\": \"\"}" - } -} -``` - -## Platform — Pipelines & Compute Envs - -### `platform_list_pipelines` -```json -{ - "service": "platform", - "api_name": "platform_list_pipelines", - "parameters": {"workspaceId": 12345, "max": 50} -} -``` - -### `platform_get_pipeline_launch` -```json -{ - "service": "platform", - "api_name": "platform_get_pipeline_launch", - "parameters": {"pipelineId": 999, "workspaceId": 12345} -} -``` - -### `platform_update_pipeline` - -Changes a pipeline's Git revision (`launch.revision`) or any other launch setting, -in place. Send only the metadata and launch fields to change. The tool retrieves -the current pipeline and merges the changes server-side, preserving omitted -settings. Use `null` to clear a nullable field and an empty `labelIds` array to -remove every pipeline label. - -Pass `versionId` to edit a specific pipeline version; omit it for the default. -The `launch` object is required for launch-configuration changes: do not place -`revision`, `workDir`, `computeEnvId`, or other launch fields beside `pipelineId`. - -```json -{ - "service": "platform", - "api_name": "platform_update_pipeline", - "parameters": { - "pipelineId": 999, - "workspaceId": 12345, - "launch": { - "revision": "master" - } - } -} -``` - -### `platform_list_pipeline_versions` - -Lists a Launchpad pipeline's Seqera pipeline versions — saved snapshots of its -launch configuration, each with a name, hash, and default flag. These are not Git -branches or tags. Omit `isPublished` to list every version; pass it only when -the user asks specifically for published or draft versions. - -```json -{ - "service": "platform", - "api_name": "platform_list_pipeline_versions", - "parameters": {"pipelineId": 999, "workspaceId": 12345} -} -``` - -### `platform_manage_pipeline_version` - -Renames a pipeline version or makes it the default, leaving its launch -configuration untouched. Promoting a version unsets the previous default. A -version cannot be renamed once workflow runs reference it. Retrieve the version -first and always send both its complete current `name` and `isDefault` flag, -changing only the requested value; Platform overwrites both when omitted. - -```json -{ - "service": "platform", - "api_name": "platform_manage_pipeline_version", - "parameters": { - "pipelineId": 999, - "workspaceId": 12345, - "versionId": "3xa1b2c3d4", - "name": "rnaseq-3", - "isDefault": true - } -} -``` - -### `platform_list_compute_envs` -```json -{ - "service": "platform", - "api_name": "platform_list_compute_envs", - "parameters": {"workspaceId": 12345, "status": "AVAILABLE"} -} -``` - -### `platform_create_compute_env` - -Seqera Compute (fully managed — no credentials needed): -```json -{ - "service": "platform", - "api_name": "platform_create_compute_env", - "parameters": { - "workspaceId": 12345, - "name": "seqera-compute-eu", - "platform": "seqeracompute-platform", - "config": { - "region": "eu-west-1" - } - } -} -``` - -AWS Batch (manual mode — requires credentials): -```json -{ - "service": "platform", - "api_name": "platform_create_compute_env", - "parameters": { - "workspaceId": 12345, - "name": "aws-batch-prod", - "platform": "aws-batch", - "credentialsId": "cred123", - "config": { - "region": "us-east-1", - "computeQueue": "arn:aws:batch:us-east-1:123456789:job-queue/nextflow", - "headQueue": "arn:aws:batch:us-east-1:123456789:job-queue/nextflow-head", - "workDir": "" - } - } -} -``` - -Set cliPath only when the compute environment requires an explicit AWS CLI -location. Use the actual configured executable rather than assuming a system -installation location. - -## Platform — Credentials - -### `platform_create_credentials` -```json -{ - "service": "platform", - "api_name": "platform_create_credentials", - "parameters": { - "workspaceId": 12345, - "name": "my-k8s-creds", - "provider": "k8s", - "keys": { - "token": "", - "certificate": "" - } - } -} -``` - -`provider` is the credential type (`aws`, `k8s`, `github`, -`container-registry`, etc.). `keys` is provider-specific — use -`search_seqera_api` with a query like "create credentials k8s" to see -the exact key names for the provider you want. - -## Wave — Containers - -### `wave_claim_container` -```json -{ - "service": "wave", - "api_name": "wave_claim_container", - "parameters": { - "condaPackages": ["bioconda::samtools=1.21"], - "platform": "linux/amd64" - } -} -``` - -## When You're Not Sure - -Run `search_seqera_api(query="...")` and copy -the `api_name` from the result. Build `parameters` from the full schema; -use `suggested_parameters` only as a required-fields starting point because it -can omit optional nested objects. Do not guess parameter names — use the -schema's exact camelCase fields and nesting. diff --git a/skills/seqerakit/SKILL.md b/skills/seqerakit/SKILL.md index f2a169d..955e110 100644 --- a/skills/seqerakit/SKILL.md +++ b/skills/seqerakit/SKILL.md @@ -15,7 +15,7 @@ pipeline, input data and execution environment from their request or current context. Use user-selected locations for files and results. Consult companion skills, bundled references and optional helpers by name when available. -For Seqera operations, use the `seqera-mcp` skill. Any `platform_*` examples +For Seqera operations, read the [MCP connection](../launch-workflow/references/seqera-mcp/README.md) connection reference. Any `platform_*` examples describe API operations. Discover their exact names and parameter schemas with `search_seqera_api`, then invoke `call_seqera_api` using those schemas. The host manages OAuth for the connected MCP server. diff --git a/sources.json b/sources.json index 487c511..e4e501c 100644 --- a/sources.json +++ b/sources.json @@ -5,7 +5,7 @@ "path": "skills/audit-conversion-readiness/SKILL.md", "source": "portal/backend/src/skills/audit-conversion-readiness/SKILL.md", "source_sha256": "c03ff0e0755129fb718f8d7d45dec4b222661c9c5e3af91145deab166907de29", - "bundled_sha256": "f11f5db7561c82f65d0b2f5470dfe44e2ab983bb6119bd157a4e4f0457a844df", + "bundled_sha256": "1951c0aaeeadfcd1a81baa76332ae374679c8bd5cdac26eda43ecbcc562a1362", "override": true }, { @@ -33,14 +33,14 @@ "path": "skills/build-nextflow-pipeline/SKILL.md", "source": "portal/backend/src/skills/build-nextflow-pipeline/SKILL.md", "source_sha256": "4dcc9dcaa19a74f8b9d05272271b5a55317ca8fd0e3ca11b3eb0edb43fe4dcad", - "bundled_sha256": "660210dd93f801eb52bcdb15ac58cac9a194f677bd145d42258d47bc80fc1944", + "bundled_sha256": "65d44a56973b99258a081a5fd58f4a3a978cdc11bfa198fd60342b7bec42455a", "override": true }, { "path": "skills/ce-credentials-setup/SKILL.md", "source": "portal/backend/src/skills/ce-credentials-setup/SKILL.md", "source_sha256": "179ed50da55eb509086eaf9e3228d063bd4d8334c0f8fff38c0f31e0e327e4e9", - "bundled_sha256": "51849d8bc50d4f9058c4ea564517983f16ac7ad4b7f2df33fd871bd3ecc6d281", + "bundled_sha256": "f08f46ce58afa13ca971bd974578a388fa6e86851b8263ce2c1db5acb34e27e1", "override": true }, { @@ -54,7 +54,7 @@ "path": "skills/ce-credentials-setup/references/kubernetes.md", "source": "portal/backend/src/skills/ce-credentials-setup/references/kubernetes.md", "source_sha256": "1b55a04577e070016fec281df80294ccdc9e738485ce3fd3b82b02502d02af65", - "bundled_sha256": "2b01d8a4c1ba9a46887274d395183f8d732eb9ffd7d108f4e83192aca516dd96", + "bundled_sha256": "2cf64d58f6ab3df54b20133b005799245e15d79b104396af56c285add173be85", "override": true }, { @@ -64,60 +64,25 @@ "bundled_sha256": "b1e39e794db10b38beb6079b7d82ee49c2c302f0480b676d06fa9ce0caebd1ac", "override": true }, - { - "path": "skills/convert-jupyter-notebook/SKILL.md", - "source": "portal/backend/src/skills/convert-jupyter-notebook/SKILL.md", - "source_sha256": "78de1341776d75e61971683185e5b29152a78cb3d0d31a89a236b3793165cff6", - "bundled_sha256": "63acb389f888ac1ab2031c351cd8066d46cb49553e4659ed8c6b1f3bbbb0557f", - "override": false - }, - { - "path": "skills/convert-python-script/SKILL.md", - "source": "portal/backend/src/skills/convert-python-script/SKILL.md", - "source_sha256": "5741caa8d726f8c6ccd036a69beb667f30d5d2836249dfb1ecb99a6db1aad560", - "bundled_sha256": "aca8aad8bb1563ef1a2bea6b98f3eef71eeee2733d9133a80423786be25ff22f", - "override": false - }, - { - "path": "skills/convert-r-script/SKILL.md", - "source": "portal/backend/src/skills/convert-r-script/SKILL.md", - "source_sha256": "523d41b30048a9e77c0ce820ed9654e3909c25715a68c187274a34cf06299c3a", - "bundled_sha256": "6520f81a6b645cc5b3a3b44bcf6f75b1bc79e63998db77620242240d500d68c1", - "override": false - }, - { - "path": "skills/convert-r-script/references/nextflow-dsl2.md", - "source": "portal/backend/src/skills/convert-r-script/references/nextflow-dsl2.md", - "source_sha256": "3e758662c8e2e5a321c20a309cdced414f5c95f213f87f592a3c79e11600410b", - "bundled_sha256": "31fa0d8ed7d3a7e59a1dd5be806b5df637ed92fb49ce109876629d67baabd6a0", - "override": false - }, - { - "path": "skills/convert-r-script/references/r-container-images.md", - "source": "portal/backend/src/skills/convert-r-script/references/r-container-images.md", - "source_sha256": "402b6723bcd6c5ac81297264cecddf4a4e21f78105cc626d862c41e55cf1f0e6", - "bundled_sha256": "2468b98641d82fad35ae002716826cde3292bbd3ea1d0ac837665825807ed8ec", - "override": false - }, { "path": "skills/create-container/SKILL.md", "source": "portal/backend/src/skills/create-container/SKILL.md", "source_sha256": "7e87a45b6665d9cb282f7f9c145e688cf57affd6e95d84a61b8ce993fc811a57", - "bundled_sha256": "fa65e97de764afe605945e74c8fd5948ea110c19843b18030cedcf3f53fe4603", - "override": false + "bundled_sha256": "b645a0dd1b55e6e89a968e0644b04201d7d93dc05c1572c1d4e695b25cf15b2a", + "override": true }, { "path": "skills/debug-local-run/SKILL.md", "source": "portal/backend/src/skills/debug-local-run/SKILL.md", "source_sha256": "dc28ac095ffdbc4e4b798d1edf132edd7090e2f96508fdc7ecaded99074e9ba2", - "bundled_sha256": "3b8255014d4a9dd95698acd4b8f31a706e5b2b1e938538cb2c376189e79f2550", - "override": false + "bundled_sha256": "cfaa0aadd28daa4781fad9df809f6160c2facd263bde274c7a8f6cdf08f505fb", + "override": true }, { "path": "skills/debug-seqera-failed-run/SKILL.md", "source": "portal/backend/src/skills/debug-seqera-failed-run/SKILL.md", "source_sha256": "6825762051ab014d6b3fa6a8a4db12e79333a00e9cb0a746659167181c8b93a3", - "bundled_sha256": "295f4726acde95df63ce44e0cc6223c0c158a8ecce0b68ac6471ea9057d8ada3", + "bundled_sha256": "1dff52c74077afc3b3d18c02dec83e5ccc46102c1b875a569579861f9adaa985", "override": true }, { @@ -166,22 +131,22 @@ "path": "skills/find-alternative-tools/SKILL.md", "source": "portal/backend/src/skills/find-alternative-tools/SKILL.md", "source_sha256": "b3acbc1417255d5b26b9058d7b80fff92a1b732d218fd1b043e636fa26e223b1", - "bundled_sha256": "de2dcb0b281c48e73e7bf91042457bfb75ae51918c92d282f87573f9acd03d9f", - "override": false + "bundled_sha256": "a3afb0b68ba4638f9ff0b6d2b27588a627040bb6b04e80e07d275c2ec65e7d35", + "override": true }, { "path": "skills/maintain-nf-core-pipeline/SKILL.md", "source": "portal/backend/src/skills/maintain-nf-core-pipeline/SKILL.md", "source_sha256": "4ab1ec7a1ad95f4e622efe4e7f56eec650e70f6f62ebe087639be82d000c837c", - "bundled_sha256": "e578f4533290689bac2aa24674ed321f4dc3e292d124cb16c1db14625f9e698e", + "bundled_sha256": "3de0db5f48b81c4db6d70a3185651ecb425f99b051eb984e9fe8b7bb6df2c837", "override": true }, { "path": "skills/maintain-nf-core-pipeline/references/nf-core-conventions.md", "source": "portal/backend/src/skills/maintain-nf-core-pipeline/references/nf-core-conventions.md", "source_sha256": "fee5073d8241a52fc24e38d60f979b1a8a49e665703d2800f3c1e7e5bd088878", - "bundled_sha256": "f09f3cb0a2183a2cdd3aac2da61920a0ccd02e9b5329ed4a225a329a25e66c4e", - "override": false + "bundled_sha256": "30fd736ccf1808f1ffa9d813aa0b490d41291c98772eafb6a5379c4a03a2a7dd", + "override": true }, { "path": "skills/maintain-nf-core-pipeline/references/template-merges/README.md", @@ -194,15 +159,15 @@ "path": "skills/maintain-nf-core-pipeline/references/template-merges/tools-4_0.md", "source": "portal/backend/src/skills/maintain-nf-core-pipeline/references/template-merges/tools-4_0.md", "source_sha256": "743295a75fea1c54adc6e93c8b479012a705beb0d74a599c2262b417f0cf415c", - "bundled_sha256": "640f316845d4e2d2eaca0cdeb82c0a3fec5484dcf8141e9aefd4bd194137e8f0", - "override": false + "bundled_sha256": "79f3cb51a5f1b9062a15423ea87d6278085694d5047bd5628b83ac04586b18ac", + "override": true }, { "path": "skills/migrate-from-snakemake/SKILL.md", "source": "portal/backend/src/skills/migrate-from-snakemake/SKILL.md", "source_sha256": "ad385af7b45a52955ba7b7b924efbb63362a98e20998ec51558e1146ab1b4880", - "bundled_sha256": "2e3366ab4a87bb36171317ee6c0b79da91796f0f78756c863d527b5dfe87422e", - "override": false + "bundled_sha256": "118f2d75d609f3e0020136964cae60508cd5255f8c84c07a8ecf588f817da6e4", + "override": true }, { "path": "skills/migrate-from-snakemake/references/nextflow-conda-troubleshooting.md", @@ -239,18 +204,11 @@ "bundled_sha256": "786ebe625b8d619affb75be8f942e5e4c64645a52be5e268d01b00f732484313", "override": false }, - { - "path": "skills/nextflow-26-syntax/SKILL.md", - "source": "portal/backend/src/skills/nextflow-26-syntax/SKILL.md", - "source_sha256": "b5d1e1ac292ef84311339091169c9f9278b32b34f61d1c34a698629eee5b21d0", - "bundled_sha256": "ce501e7f4dc1819811e118aa7b902a1794b365b4e7ced04df68a69fba3582998", - "override": false - }, { "path": "skills/nextflow-config/SKILL.md", "source": "portal/backend/src/skills/nextflow-config/SKILL.md", "source_sha256": "1c421137313d594b23128d5bb74768ba8c68617f23f612f9961292a359f4b8dd", - "bundled_sha256": "4404ac52c2a446d28c8ea1c7506ea2f17a96b7c483fd9e524760bb4f5a58dfe9", + "bundled_sha256": "2aff5b7f9ce1eb14e378bb786de522c12b56bafd2c7b04d969bcf98276d0be8f", "override": true }, { @@ -271,22 +229,22 @@ "path": "skills/nextflow-history/SKILL.md", "source": "portal/backend/src/skills/nextflow-history/SKILL.md", "source_sha256": "4f2ce1b1d39236f1f5b1d7de1ae07d3324b2b8cc32c79e3c6821f43cd2e09bd4", - "bundled_sha256": "b2777114bd583e6ce1e5d40662b67f1fa4c1dfde146c670cf980baf524a03d60", - "override": false + "bundled_sha256": "4d7db39e87e790db250b8aeb504350faec2d3b3d0d3491b979ee55edadb22a2a", + "override": true }, { "path": "skills/nextflow-output-patterns/SKILL.md", "source": "portal/backend/src/skills/nextflow-output-patterns/SKILL.md", "source_sha256": "b8ee43fb09ae92ddf90b7b4ea9517b4660e297879804c8a51c1988765017df72", - "bundled_sha256": "f1fe3710aad4ebac69b69f03624e9172671968a9d18ca5b75e3c71e979eb7c02", - "override": false + "bundled_sha256": "9ce001226ba2c0a5217ba2b78bdadd18727d78abb3ad3203e979f57230a9d9a5", + "override": true }, { "path": "skills/nextflow-schema/SKILL.md", "source": "portal/backend/src/skills/nextflow-schema/SKILL.md", "source_sha256": "52e37b4ae0418b3ed7e8277b184efcc9fe2e67e2a877dd6c5df0b92203c91345", - "bundled_sha256": "added0059f7fcd46761a0f3a139d9e39a64142e35a59dcce7b6109c26a34f58d", - "override": false + "bundled_sha256": "a86c1312969e75f8b996c2ceef8d5b6b54c5675cbfa998a363a6c740ff56ded8", + "override": true }, { "path": "skills/nextflow-schema/references/minimal-launchpad-schema.md", @@ -313,14 +271,14 @@ "path": "skills/nf-data-lineage/SKILL.md", "source": "portal/backend/src/skills/nf-data-lineage/SKILL.md", "source_sha256": "81f88126cf85d2da22f03f7f5ae3c38256b63cccc5350cfc7348e55631ca92a7", - "bundled_sha256": "031ca4a6eb25264dd65e98d5b6a3ab155ace8cfba132d3f2065e3fea0bb2f06e", - "override": false + "bundled_sha256": "217cf839f27edd53e9b8e6fd3c1658c13a8c8745f00131d0ca409b91786edb06", + "override": true }, { "path": "skills/nf-docker-scripts/SKILL.md", "source": "portal/backend/src/skills/nf-docker-scripts/SKILL.md", "source_sha256": "867fbfd0d732efc9655df1e025e89a608f049bf2397b057a38fcfd1af266b249", - "bundled_sha256": "7174f3f76f853a5d0e11becb6e0b8795197113264c3f03ae5e9f3a5476e44f52", + "bundled_sha256": "03cf2260d63b6266813a39074743e369170ad664ab598581c900e564d0c2d1f8", "override": true }, { @@ -334,7 +292,7 @@ "path": "skills/nf-pipeline-design/SKILL.md", "source": "portal/backend/src/skills/nf-pipeline-design/SKILL.md", "source_sha256": "580d7f415a3a267fc2bd23da92848281b4cc32974a14c978b3395bdcfa6a4645", - "bundled_sha256": "8f328aded8e5f403567e75b52600680ce0fdad27f2eff7b40cc4c3ac29064457", + "bundled_sha256": "c399ca5043d70a869049e2509a55ae254e9f39ca22a235ce47c1cdd55e606b3d", "override": true }, { @@ -509,43 +467,22 @@ "path": "skills/nf-plugin-development/SKILL.md", "source": "portal/backend/src/skills/nf-plugin-development/SKILL.md", "source_sha256": "5a328e82652bbe4d0dfc3afdc3877379ce54e1fea7258b6bbf432692a31ee117", - "bundled_sha256": "56521e7530cbbc4511c28b6f5a97378b5b991d52fe0fe8d571bc51e4079f1fca", + "bundled_sha256": "f516302bd674f1642291569c8daf20e3fb10abd4d740716b55c2c0c69b2858f2", "override": true }, { "path": "skills/nf-plugin-legacy-migration/SKILL.md", "source": "portal/backend/src/skills/nf-plugin-legacy-migration/SKILL.md", "source_sha256": "635d3c3ad2fb29f77cf4bea08cbea5267b636d45aa697d05302a1081d5545c97", - "bundled_sha256": "ab67ec379b8ba44fb758683bc52c5d5486fb9d2a602fcaac869073c4fbeed26f", - "override": false - }, - { - "path": "skills/nf-run-history/SKILL.md", - "source": "portal/backend/src/skills/nf-run-history/SKILL.md", - "source_sha256": "8bcb5e04a79bb28b0cb833e5fdf32f7d81a79eaee81e2e97d2316b486dc3502c", - "bundled_sha256": "8201f342b21a40833f23223b4344a15c686112c2396229bf82a0fb9bd9447e21", - "override": false - }, - { - "path": "skills/nf-schema-migration/SKILL.md", - "source": "portal/backend/src/skills/nf-schema-migration/SKILL.md", - "source_sha256": "7ad9594c20f6b128ff2c7475f10b8b0ce60af5d5a94c07e9b5216821c53e48b5", - "bundled_sha256": "3ea1c04daac1bf94d144c26732fa6836a7754d24c01bc2fd9336cbe3eb56c244", - "override": false - }, - { - "path": "skills/nf-schema-migration/references/migration-guide.md", - "source": "portal/backend/src/skills/nf-schema-migration/references/migration-guide.md", - "source_sha256": "8469c64f02241dfb7097020d331af3c607746c3958b6c32fefe718cd67a07d8a", - "bundled_sha256": "80841c0f4500d56cf95090566ed998a86ebd761dbd3dc4c93dc227a67e7d9073", - "override": false + "bundled_sha256": "20087fc58d5543faf735b18dee7fe9b16ff4feb541c79edaf0e464a251d2c9a4", + "override": true }, { "path": "skills/nf-test/SKILL.md", "source": "portal/backend/src/skills/nf-test/SKILL.md", "source_sha256": "87865ca1eac374c3a0425abae85401a03a477ae0a78db353eb3742c08ff4fc96", - "bundled_sha256": "77756ef34aa980cc7f0ccd4d806659f4de9f5b75c5c33ccef118b52da05908fe", - "override": false + "bundled_sha256": "21d2ffd2853a4e3ba8b8a6eebc7a2616f1f04edfb15f3b7701daa6ec83e72d76", + "override": true }, { "path": "skills/nf-test/references/assertions.md", @@ -582,113 +519,41 @@ "bundled_sha256": "c8cd658d58a26e1adde8737acfdc214732faf2176396eff0c04c77f2cd55b9c4", "override": false }, - { - "path": "skills/nf-v2-boolean-params/SKILL.md", - "source": "portal/backend/src/skills/nf-v2-boolean-params/SKILL.md", - "source_sha256": "8771e4330ea11d17aca403c9b2e3998152c5b5986a9da096daed20f1c8ba35c1", - "bundled_sha256": "54f5cf9def8cc7dcdb3389805fb92990df5f826400c53d1e741dd08390ba6384", - "override": false - }, - { - "path": "skills/repair-nf-test/SKILL.md", - "source": "portal/backend/src/skills/repair-nf-test/SKILL.md", - "source_sha256": "84260ee9889dd7d236941f04c52a05904d1631617b04a06b2409df64fad6a020", - "bundled_sha256": "52b93ea98917dd1c244fe8c3a345db3286a013f33aa7f433c97cb605ea3dbbad", - "override": false - }, { "path": "skills/repair-workflow/SKILL.md", "source": "portal/backend/src/skills/repair-workflow/SKILL.md", "source_sha256": "43567947449b6dcd44c34bded2a44c93826d42fd703c71576fdca3780e39d72a", - "bundled_sha256": "47b79a87a0f7f2e272c301e79e03c2e1c21b736d97662705114a01ff4ef03124", - "override": false + "bundled_sha256": "eb5e0fb4c5f490fd94adfa0563ecf98984fcf2377cddb213df941a6fb396262d", + "override": true }, { "path": "skills/repair-workflow/references/repair-checklists.md", "source": "portal/backend/src/skills/repair-workflow/references/repair-checklists.md", "source_sha256": "5d3f8ff37d457cf2abb4871211f07e0c76a0050e0dd01101cba4369fc3d96dab", - "bundled_sha256": "ee10f9c18dab4907e37588c47a8361b2b2ecd200e36bc0c8f93fb0c0f1593d07", - "override": false + "bundled_sha256": "80eeabc193f92a1a07801fdb8408dfce1c8975906405298172de97670d9e3f0f", + "override": true }, { "path": "skills/search-existing-modules/SKILL.md", "source": "portal/backend/src/skills/search-existing-modules/SKILL.md", "source_sha256": "73ab4e956a3bddd4382a8d74911963a8c51a72abcd3ff8a7fd0d49bd8ffd53a9", - "bundled_sha256": "55a609056fe58ef368a49df5e7206417bd9ac08a106316c1a873d0e333ff3a8a", - "override": false + "bundled_sha256": "c75b8a5342dea17c076dff23ab44c927dd32d399d203d2059c3b7a74449c3232", + "override": true }, { "path": "skills/seqera-data-links/SKILL.md", "source": "portal/backend/src/skills/seqera-data-links/SKILL.md", "source_sha256": "1ac21b9aa3cc01ab4c05497675b439da3eebe85b17ceb326e953a586681a04fb", - "bundled_sha256": "7c1fc42107a2a16e3ff848c1c4c091a9fd671f65eb07c91597e846b0a842374b", + "bundled_sha256": "4bffc8f64b60cfe29d330d01a6044f9598902ab8280e31561a75d0c7e0039ac5", "override": true }, - { - "path": "skills/seqera-mcp/SKILL.md", - "source": "portal/backend/src/skills/seqera-mcp/SKILL.md", - "source_sha256": "1315cd22bcacef7660c2e853307956e681c2599bd8d0d6a2bf980da831433e18", - "bundled_sha256": "a12d5ac50f4ef61227675b24599889ab3bb77275af59a1492333078b1b205c59", - "override": true, - "review_preparation_adaptation": true - }, - { - "path": "skills/seqera-mcp/references/tool-schemas.md", - "source": "portal/backend/src/skills/seqera-mcp/references/tool-schemas.md", - "source_sha256": "a0076ef3ed83ebc9f24fc7b63fbb3cce415ebf9825b2dc3f4686148e8fd706fc", - "bundled_sha256": "282ff07cc67bb23d96f933840dd54cfa0aa512328a8d31cae1e4287d43569f69", - "override": false, - "review_preparation_adaptation": true - }, { "path": "skills/seqerakit/SKILL.md", "source": "portal/backend/src/skills/seqerakit/SKILL.md", "source_sha256": "4e70348d52b774e716d4e48091317b5b22c48c7c6482712543d32ecb6898ecf7", - "bundled_sha256": "f89f87ebd46dc03c0b4aea83df2e8ce4aadeba0177e225ea0269122b46c4e455", + "bundled_sha256": "74071d070e8fb9abf68d56eb718affe92ed560d03a8b77ed83cb95498d67b92e", "override": true }, - { - "path": "skills/triage-pipeline-parameters/SKILL.md", - "source": "portal/backend/src/skills/triage-pipeline-parameters/SKILL.md", - "source_sha256": "b0f05305aaa356d0cd933ecbe8b9a62db2b9433557dca68e0c70df4661377898", - "bundled_sha256": "949428762ecf796121a44c2a54b003d88a1c45c81cc0d95f8ba50c1326ec9948", - "override": false - }, - { - "path": "skills/nf-debug/SKILL.md", - "source": "portal/.agents/skills/nf-debug/SKILL.md", - "source_sha256": "c3edab111eb1aa1529ff4780ed00db451e1e64a03bc2f8940daca7269aabc7eb", - "bundled_sha256": "5e3461903b5c1e72dc7381ede90e2648550546fa6e564e3da9bcdc0de7ef1c53", - "override": false - }, - { - "path": "skills/nf-migrate-25-04/SKILL.md", - "source": "portal/.agents/skills/nf-migrate-25-04/SKILL.md", - "source_sha256": "bbb89170c1e42812c00b98d675da7ea95af9f6e99234315253b88b386904f089", - "bundled_sha256": "7fea957ff47d6e7de2a0d281b58c367daca1a5370c19c44d36044cb0a6a88393", - "override": false - }, - { - "path": "skills/nf-migrate-25-04/references/upstream-25-04.md", - "source": "portal/.agents/skills/nf-migrate-25-04/references/upstream-25-04.md", - "source_sha256": "8b50112d5df68dac2986b3204480816be5e885539c4d2535583a6ec5592a8410", - "bundled_sha256": "f0ec9f986abb0707c53f57f165f7ff1c7b75f6a5cfa77afad84681814742f56a", - "override": false - }, - { - "path": "skills/nf-migrate-25-04/scripts/find_deprecated_patterns.py", - "source": "portal/.agents/skills/nf-migrate-25-04/scripts/find_deprecated_patterns.py", - "source_sha256": "a23a4eb685ef75baf62d7fa4b3464bd521e9524f850a18403160b4e38c53cc35", - "bundled_sha256": "a23a4eb685ef75baf62d7fa4b3464bd521e9524f850a18403160b4e38c53cc35", - "override": false - }, - { - "path": "skills/nf-migrate-25-04/scripts/find_shell_blocks.py", - "source": "portal/.agents/skills/nf-migrate-25-04/scripts/find_shell_blocks.py", - "source_sha256": "13efcf3abb1510b88694d973d8d98be643c43fb189774a05fc3810453dab3a70", - "bundled_sha256": "13efcf3abb1510b88694d973d8d98be643c43fb189774a05fc3810453dab3a70", - "override": false - }, { "path": "skills/nextflow-development/LICENSE.txt", "source": "bio-research/nextflow-development/LICENSE.txt", @@ -700,8 +565,8 @@ "path": "skills/nextflow-development/SKILL.md", "source": "bio-research/nextflow-development/SKILL.md", "source_sha256": "f30017df5d499427a701ec6cedfc5c9948ca3bd04ee1a2b6a585a29cd93ad0d7", - "bundled_sha256": "4659611202bcfbd7c3222fd791345fac0542ed13a7c5218773eb448830ce18d1", - "override": false + "bundled_sha256": "bcf6ba30540700750b754248e592d5d8fdddfcf1c61b44eb5d6fbea7e4db7d08", + "override": true }, { "path": "skills/nextflow-development/references/geo-sra-acquisition.md", @@ -864,32 +729,25 @@ "bundled_sha256": "fe54e31cd70943629bbc33005d75961646a5875fcb320f5bc6b031e3c21bbcd7", "override": false }, - { - "path": "skills/create-workflow/SKILL.md", - "source": "https://github.com/nextflow-io/agent-skills/blob/1edf73763da408c410074568f228a75fc6d42864/skills/create-workflow/SKILL.md", - "source_sha256": "cb038d5bc1c2b5a7e76f309cf28b8dfe889e88235d03717a9862f2b5a7434972", - "bundled_sha256": "673f63371de41f639e260ad1e821b84b1078b8c2244cf256c1c33b3e9e98acf2", - "override": true - }, { "path": "skills/install-nextflow/SKILL.md", "source": "https://github.com/nextflow-io/agent-skills/blob/1edf73763da408c410074568f228a75fc6d42864/skills/install-nextflow/SKILL.md", "source_sha256": "a2b8ba6464bc60dbc51c5aa47d024a9efd4e44af3c17f5e27a4ea099ffa5e4e9", - "bundled_sha256": "4d978583a1d3bc30c4ccda1755510aba61e00b65e3d7957585dde8340ba4a1e9", + "bundled_sha256": "c3f92be707c973f8bb77d6c51ac48c437022d0986ea7c06429dd9aa6ae50edc6", "override": true }, { "path": "skills/launch-workflow/SKILL.md", "source": "https://github.com/nextflow-io/agent-skills/blob/1edf73763da408c410074568f228a75fc6d42864/skills/launch-workflow/SKILL.md", "source_sha256": "40ee0cca1679931ecdc284e86193b34a400d861f25d341cf3a358d4dce310cd3", - "bundled_sha256": "747bf20bf90755f06017fa6ef5272842ea0360d0c118d4a1ce54b996bc8e015d", + "bundled_sha256": "d001c34ba07399df9fdb1b82542298d9e6fb1dda0e651dc39272f7edb4716934", "override": true }, { "path": "skills/migrate-nextflow-code/SKILL.md", "source": "https://github.com/nextflow-io/agent-skills/blob/1edf73763da408c410074568f228a75fc6d42864/skills/migrate-nextflow-code/SKILL.md", "source_sha256": "7cdba1fd11ecda34189503669f989e97ffc611fe957a051fb83357073faab021", - "bundled_sha256": "18a01710d1681eb46481b975c468118a4805aa96cada67cbe5afbe1df08b0b06", + "bundled_sha256": "7757667ad9fe127cee1c1804a3e6bc237fdfa1d95424adb42377f34922cbe95d", "override": true }, { @@ -945,7 +803,7 @@ "path": "skills/run-module/SKILL.md", "source": "https://github.com/nextflow-io/agent-skills/blob/1edf73763da408c410074568f228a75fc6d42864/skills/run-module/SKILL.md", "source_sha256": "206c2ad84616fca3290e3ed9d004404ea4b298d78cbb739efafdd65458a1f666", - "bundled_sha256": "7024b54392c9eea94d9a84662faddad2c580520363de819bbb6cf5ba9d7b05ca", + "bundled_sha256": "9c77a04b44f15651cac0750666173325bd0620b3c580359d84d540ce706ad7bc", "override": true }, { @@ -954,6 +812,140 @@ "source_sha256": "4baa8db788e56819432fde89ffae786189657d7da94fc5f9b4cbc05b16c1d73a", "bundled_sha256": "4baa8db788e56819432fde89ffae786189657d7da94fc5f9b4cbc05b16c1d73a", "override": false + }, + { + "path": "skills/build-nextflow-pipeline/references/create-workflow/README.md", + "source": "https://github.com/nextflow-io/agent-skills/blob/1edf73763da408c410074568f228a75fc6d42864/skills/create-workflow/SKILL.md", + "source_sha256": "cb038d5bc1c2b5a7e76f309cf28b8dfe889e88235d03717a9862f2b5a7434972", + "bundled_sha256": "573e08cdc4c08632f1896c929c9751700ec46d3c30380b5ec451d7435ed712c9", + "override": true + }, + { + "path": "skills/build-nextflow-pipeline/references/convert-python-script/README.md", + "source": "portal/backend/src/skills/convert-python-script/SKILL.md", + "source_sha256": "5741caa8d726f8c6ccd036a69beb667f30d5d2836249dfb1ecb99a6db1aad560", + "bundled_sha256": "06d5510c5f78e228566e74f30c3d024a92bf03c44f5c48fe07692784aa16dd9d", + "override": true + }, + { + "path": "skills/build-nextflow-pipeline/references/convert-r-script/README.md", + "source": "portal/backend/src/skills/convert-r-script/SKILL.md", + "source_sha256": "523d41b30048a9e77c0ce820ed9654e3909c25715a68c187274a34cf06299c3a", + "bundled_sha256": "f0558baf14d93ac3606cd1509056ee6e32ce9b67a121ee4622545fc706944229", + "override": true + }, + { + "path": "skills/build-nextflow-pipeline/references/convert-r-script/references/nextflow-dsl2.md", + "source": "portal/backend/src/skills/convert-r-script/references/nextflow-dsl2.md", + "source_sha256": "3e758662c8e2e5a321c20a309cdced414f5c95f213f87f592a3c79e11600410b", + "bundled_sha256": "31fa0d8ed7d3a7e59a1dd5be806b5df637ed92fb49ce109876629d67baabd6a0", + "override": true + }, + { + "path": "skills/build-nextflow-pipeline/references/convert-r-script/references/r-container-images.md", + "source": "portal/backend/src/skills/convert-r-script/references/r-container-images.md", + "source_sha256": "402b6723bcd6c5ac81297264cecddf4a4e21f78105cc626d862c41e55cf1f0e6", + "bundled_sha256": "2468b98641d82fad35ae002716826cde3292bbd3ea1d0ac837665825807ed8ec", + "override": true + }, + { + "path": "skills/build-nextflow-pipeline/references/convert-jupyter-notebook/README.md", + "source": "portal/backend/src/skills/convert-jupyter-notebook/SKILL.md", + "source_sha256": "78de1341776d75e61971683185e5b29152a78cb3d0d31a89a236b3793165cff6", + "bundled_sha256": "a53cd55a068f5142430a662793d04fcc4073f3e63ee28bfea066e8d74cbd9d31", + "override": true + }, + { + "path": "skills/nextflow-schema/references/triage-pipeline-parameters/README.md", + "source": "portal/backend/src/skills/triage-pipeline-parameters/SKILL.md", + "source_sha256": "b0f05305aaa356d0cd933ecbe8b9a62db2b9433557dca68e0c70df4661377898", + "bundled_sha256": "b743664fd53dc59f56367e035929552d4079f773e9230b601be4d993782128b4", + "override": true + }, + { + "path": "skills/nextflow-schema/references/nf-schema-migration/README.md", + "source": "portal/backend/src/skills/nf-schema-migration/SKILL.md", + "source_sha256": "7ad9594c20f6b128ff2c7475f10b8b0ce60af5d5a94c07e9b5216821c53e48b5", + "bundled_sha256": "d060648ec27e9ad84ad54386e737c3e4238d256ac98a91fe3730f0db1390856a", + "override": true + }, + { + "path": "skills/nextflow-schema/references/nf-schema-migration/references/migration-guide.md", + "source": "portal/backend/src/skills/nf-schema-migration/references/migration-guide.md", + "source_sha256": "8469c64f02241dfb7097020d331af3c607746c3958b6c32fefe718cd67a07d8a", + "bundled_sha256": "80841c0f4500d56cf95090566ed998a86ebd761dbd3dc4c93dc227a67e7d9073", + "override": true + }, + { + "path": "skills/nf-test/references/repair-nf-test/README.md", + "source": "portal/backend/src/skills/repair-nf-test/SKILL.md", + "source_sha256": "84260ee9889dd7d236941f04c52a05904d1631617b04a06b2409df64fad6a020", + "bundled_sha256": "bc7e29f95646bebddf3cdb518c11ed91fcfdde9afec9b1fb587467b9542251a3", + "override": true + }, + { + "path": "skills/repair-workflow/references/nf-debug/README.md", + "source": "portal/.agents/skills/nf-debug/SKILL.md", + "source_sha256": "c3edab111eb1aa1529ff4780ed00db451e1e64a03bc2f8940daca7269aabc7eb", + "bundled_sha256": "208c48fbcda03cd50eb8d6d39099147844b24117d4f6d05148214df18e86c12b", + "override": true + }, + { + "path": "skills/nextflow-history/references/nf-run-history/README.md", + "source": "portal/backend/src/skills/nf-run-history/SKILL.md", + "source_sha256": "8bcb5e04a79bb28b0cb833e5fdf32f7d81a79eaee81e2e97d2316b486dc3502c", + "bundled_sha256": "c621a800089d642c467edd6b96080fe85884c546a9d996dccc31e26f548e80f5", + "override": true + }, + { + "path": "skills/migrate-nextflow-code/references/nextflow-26-syntax/README.md", + "source": "portal/backend/src/skills/nextflow-26-syntax/SKILL.md", + "source_sha256": "b5d1e1ac292ef84311339091169c9f9278b32b34f61d1c34a698629eee5b21d0", + "bundled_sha256": "b58374992b14ebebc203ac43c221d26dd952f3bced42b786961dc51a7c3f5139", + "override": true + }, + { + "path": "skills/migrate-nextflow-code/references/nf-v2-boolean-params/README.md", + "source": "portal/backend/src/skills/nf-v2-boolean-params/SKILL.md", + "source_sha256": "8771e4330ea11d17aca403c9b2e3998152c5b5986a9da096daed20f1c8ba35c1", + "bundled_sha256": "8088f1e3c4555e925bfcce700367062b73dd4e2afad2b44b07af6768697d150a", + "override": true + }, + { + "path": "skills/migrate-nextflow-code/references/nf-migrate-25-04/README.md", + "source": "portal/.agents/skills/nf-migrate-25-04/SKILL.md", + "source_sha256": "bbb89170c1e42812c00b98d675da7ea95af9f6e99234315253b88b386904f089", + "bundled_sha256": "c266879140e439f00753c42fcde0f6b954085d466598136b06b27e1cdcbb4611", + "override": true + }, + { + "path": "skills/migrate-nextflow-code/references/nf-migrate-25-04/references/upstream-25-04.md", + "source": "portal/.agents/skills/nf-migrate-25-04/references/upstream-25-04.md", + "source_sha256": "8b50112d5df68dac2986b3204480816be5e885539c4d2535583a6ec5592a8410", + "bundled_sha256": "f0ec9f986abb0707c53f57f165f7ff1c7b75f6a5cfa77afad84681814742f56a", + "override": true + }, + { + "path": "skills/migrate-nextflow-code/references/nf-migrate-25-04/scripts/find_deprecated_patterns.py", + "source": "portal/.agents/skills/nf-migrate-25-04/scripts/find_deprecated_patterns.py", + "source_sha256": "a23a4eb685ef75baf62d7fa4b3464bd521e9524f850a18403160b4e38c53cc35", + "bundled_sha256": "a23a4eb685ef75baf62d7fa4b3464bd521e9524f850a18403160b4e38c53cc35", + "override": true + }, + { + "path": "skills/migrate-nextflow-code/references/nf-migrate-25-04/scripts/find_shell_blocks.py", + "source": "portal/.agents/skills/nf-migrate-25-04/scripts/find_shell_blocks.py", + "source_sha256": "13efcf3abb1510b88694d973d8d98be643c43fb189774a05fc3810453dab3a70", + "bundled_sha256": "13efcf3abb1510b88694d973d8d98be643c43fb189774a05fc3810453dab3a70", + "override": true + }, + { + "path": "skills/launch-workflow/references/seqera-mcp/README.md", + "source": "portal/backend/src/skills/seqera-mcp/SKILL.md", + "source_sha256": "1315cd22bcacef7660c2e853307956e681c2599bd8d0d6a2bf980da831433e18", + "bundled_sha256": "568daae3ffaef7092ccd578cd630d5d0a5741fecfd2914a59192102902b1b652", + "override": true, + "review_preparation_adaptation": true } ], "github_upstreams": [ @@ -1152,22 +1144,113 @@ "skills/audit-conversion-readiness/SKILL.md", "skills/audit-conversion-readiness/references/tool-availability.md", "skills/build-nextflow-pipeline/SKILL.md", + "skills/build-nextflow-pipeline/references/convert-jupyter-notebook/README.md", + "skills/build-nextflow-pipeline/references/convert-python-script/README.md", + "skills/build-nextflow-pipeline/references/convert-r-script/README.md", + "skills/build-nextflow-pipeline/references/convert-r-script/references/nextflow-dsl2.md", + "skills/build-nextflow-pipeline/references/convert-r-script/references/r-container-images.md", + "skills/build-nextflow-pipeline/references/create-workflow/README.md", "skills/ce-credentials-setup/SKILL.md", "skills/ce-credentials-setup/references/aws-batch.md", "skills/ce-credentials-setup/references/kubernetes.md", "skills/ce-credentials-setup/references/seqera-compute.md", + "skills/create-container/SKILL.md", + "skills/debug-local-run/SKILL.md", "skills/debug-seqera-failed-run/SKILL.md", "skills/debug-seqera-failed-run/references/debug-workflow.md", + "skills/find-alternative-tools/SKILL.md", + "skills/install-nextflow/SKILL.md", "skills/launch-workflow/SKILL.md", + "skills/launch-workflow/references/seqera-mcp/README.md", "skills/maintain-nf-core-pipeline/SKILL.md", + "skills/maintain-nf-core-pipeline/references/nf-core-conventions.md", + "skills/maintain-nf-core-pipeline/references/template-merges/tools-4_0.md", + "skills/migrate-from-snakemake/SKILL.md", + "skills/migrate-nextflow-code/SKILL.md", + "skills/migrate-nextflow-code/references/nextflow-26-syntax/README.md", + "skills/migrate-nextflow-code/references/nf-migrate-25-04/README.md", + "skills/migrate-nextflow-code/references/nf-migrate-25-04/references/upstream-25-04.md", + "skills/migrate-nextflow-code/references/nf-migrate-25-04/scripts/find_deprecated_patterns.py", + "skills/migrate-nextflow-code/references/nf-migrate-25-04/scripts/find_shell_blocks.py", + "skills/migrate-nextflow-code/references/nf-v2-boolean-params/README.md", "skills/nextflow-config/SKILL.md", "skills/nextflow-config/references/config-options.md", + "skills/nextflow-development/SKILL.md", + "skills/nextflow-history/SKILL.md", + "skills/nextflow-history/references/nf-run-history/README.md", + "skills/nextflow-output-patterns/SKILL.md", + "skills/nextflow-schema/SKILL.md", + "skills/nextflow-schema/references/nf-schema-migration/README.md", + "skills/nextflow-schema/references/nf-schema-migration/references/migration-guide.md", + "skills/nextflow-schema/references/triage-pipeline-parameters/README.md", + "skills/nf-data-lineage/SKILL.md", "skills/nf-docker-scripts/SKILL.md", "skills/nf-pipeline-design/SKILL.md", "skills/nf-plugin-development/SKILL.md", + "skills/nf-plugin-legacy-migration/SKILL.md", + "skills/nf-test/SKILL.md", + "skills/nf-test/references/repair-nf-test/README.md", + "skills/repair-workflow/SKILL.md", + "skills/repair-workflow/references/nf-debug/README.md", + "skills/repair-workflow/references/repair-checklists.md", + "skills/run-module/SKILL.md", + "skills/search-existing-modules/SKILL.md", "skills/seqera-data-links/SKILL.md", - "skills/seqera-mcp/SKILL.md", "skills/seqerakit/SKILL.md" + ], + "consolidated_skills": [ + { + "from": "create-workflow", + "to": "build-nextflow-pipeline" + }, + { + "from": "convert-python-script", + "to": "build-nextflow-pipeline" + }, + { + "from": "convert-r-script", + "to": "build-nextflow-pipeline" + }, + { + "from": "convert-jupyter-notebook", + "to": "build-nextflow-pipeline" + }, + { + "from": "triage-pipeline-parameters", + "to": "nextflow-schema" + }, + { + "from": "nf-schema-migration", + "to": "nextflow-schema" + }, + { + "from": "repair-nf-test", + "to": "nf-test" + }, + { + "from": "nf-debug", + "to": "repair-workflow" + }, + { + "from": "nf-run-history", + "to": "nextflow-history" + }, + { + "from": "nextflow-26-syntax", + "to": "migrate-nextflow-code" + }, + { + "from": "nf-v2-boolean-params", + "to": "migrate-nextflow-code" + }, + { + "from": "nf-migrate-25-04", + "to": "migrate-nextflow-code" + }, + { + "from": "seqera-mcp", + "to": "launch-workflow" + } ] } } diff --git a/tools/consolidate_skills.py b/tools/consolidate_skills.py new file mode 100644 index 0000000..9042432 --- /dev/null +++ b/tools/consolidate_skills.py @@ -0,0 +1,171 @@ +#!/usr/bin/env python3 +"""Fold skill entrypoints into linked playbooks without losing assets or provenance. + +Run after import_package.py's upstream edits. The checked-in consolidation plan +is replayed on every import; existing consolidated trees can also be updated. +""" + +import argparse +import hashlib +import json +import os +import re +import shutil +from pathlib import Path + +PLAN = Path(__file__).with_name("skill_consolidations.json") + + +def write_json(path: Path, value: dict) -> None: + path.write_text(json.dumps(value, indent=2, ensure_ascii=False) + "\n") + + +def split_frontmatter(text: str) -> tuple[str, str]: + match = re.match(r"\A---\n.*?\n---\n", text, re.S) + if not match: + raise ValueError("skill must start with closed YAML frontmatter") + return match.group(), text[match.end():] + + +def rebase_markdown_links(text: str, old_path: Path, new_path: Path, + source: Path, destination: Path) -> str: + def relocate(match: re.Match) -> str: + target = match.group(2) + location, separator, anchor = target.partition("#") + if not location or location.startswith(("/", "<")) or re.match(r"[a-zA-Z][\w+.-]*:", location): + return match.group() + resolved = (old_path.parent / location).resolve() + if resolved.is_relative_to(source.resolve()): + relative = resolved.relative_to(source.resolve()) + if relative == Path("SKILL.md"): + relative = Path("README.md") + resolved = destination / relative + rebased = Path(os.path.relpath(resolved, new_path.parent)).as_posix() + return f"{match.group(1)}{rebased}{separator}{anchor})" + + return re.sub(r"(\[[^\]]*\]\()([^\s)]+)\)", relocate, text) + + +def apply_consolidations(root: Path, plan: dict, assets: Path) -> None: + sources_path = root / "sources.json" + sources = json.loads(sources_path.read_text()) + entries = {entry["path"]: entry for entry in sources["files"]} + edited = set(sources["claude_curation"]["edited_files"]) + for group in plan["groups"]: + folds = group["folds"] + pending = [fold for fold in folds if (root / "skills" / fold["from"]).is_dir()] + if pending and len(pending) != len(folds): + raise ValueError("partially consolidated group; restore its source skills before replay") + if not pending: + for fold in folds: + guide = root / "skills" / fold["to"] / "references" / fold["from"] / "README.md" + if not guide.is_file(): + raise ValueError(f"missing source skill and consolidated guide: {fold['from']}") + continue + + # Exact, fail-closed adaptations precede moving/relinking this group. + for edit in group.get("edits", []): + path = root / edit["path"] + text = path.read_text() + if text.count(edit["old"]) != 1: + raise ValueError(f"edit for {edit['path']} must match exactly once") + path.write_text(text.replace(edit["old"], edit["new"])) + + for fold in folds: + source = root / "skills" / fold["from"] + receiver = root / "skills" / fold["to"] / "SKILL.md" + destination = receiver.parent / "references" / fold["from"] + if not receiver.is_file() or destination.exists(): + raise ValueError(f"invalid consolidation destination: {destination}") + destination.parent.mkdir(parents=True, exist_ok=True) + shutil.move(str(source), destination) + old_guide = destination / "SKILL.md" + _, body = split_frontmatter(old_guide.read_text()) + guide = destination / "README.md" + guide.write_text(body.lstrip()) + old_guide.unlink() + if fold.get("guide_override"): + guide.write_text((assets / fold["guide_override"]).read_text()) + for dropped in fold.get("drop", []): + (destination / dropped).unlink() + for path in destination.rglob("*.md"): + if path == guide and fold.get("guide_override"): + continue # Authored override links already use the new location. + relative = Path("SKILL.md") if path == guide else path.relative_to(destination) + path.write_text(rebase_markdown_links( + path.read_text(), source / relative, path, source, destination, + )) + + # Keep original source identity/hash; record new bundled path/hash below. + prefix = f"skills/{fold['from']}/" + for key in list(entries): + if not key.startswith(prefix): + continue + entry = entries.pop(key) + relative = key[len(prefix):] + if relative in fold.get("drop", []): + continue + if relative == "SKILL.md": + relative = "README.md" + entry["path"] = f"skills/{fold['to']}/references/{fold['from']}/{relative}" + entry["override"] = True + entries[entry["path"]] = entry + edited.discard(key) + edited.add(entry["path"]) + + relative_guide = f"references/{fold['from']}/README.md" + text = receiver.read_text().rstrip() + text += f"\n\n## {fold['heading']}\n\n{fold['when']} Read [{fold['label']}]({relative_guide}) before proceeding.\n" + receiver.write_text(text) + + # References replace invocation of removed skills. Frontmatter routes to + # the surviving skill; bodies link directly to the appropriate playbook. + for path in sorted((root / "skills").rglob("*.md")): + text = path.read_text() + frontmatter, body = split_frontmatter(text) if path.name == "SKILL.md" else ("", text) + for fold in folds: + old = fold["from"] + guide = root / "skills" / fold["to"] / "references" / old / "README.md" + relative = Path(os.path.relpath(guide, path.parent)).as_posix() + pattern = rf"`{re.escape(old)}`|(? None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--root", type=Path, default=Path(__file__).resolve().parent.parent) + parser.add_argument("--plan", type=Path, default=PLAN) + args = parser.parse_args() + apply_consolidations(args.root.resolve(), json.loads(args.plan.read_text()), args.plan.parent) + + +if __name__ == "__main__": + main() diff --git a/tools/curation/mcp-connection.md b/tools/curation/mcp-connection.md new file mode 100644 index 0000000..3ad3ac2 --- /dev/null +++ b/tools/curation/mcp-connection.md @@ -0,0 +1,30 @@ +# Seqera MCP connection and discovery + +Use the plugin's configured Seqera MCP connection (`https://mcp.seqera.io/mcp`). +The host manages OAuth sign-in and credentials. Never paste tokens into prompts, +files or command examples. A missing connection is a capability gap, not a reason +to bypass authentication with curl or copied credentials. + +## Discover → execute → verify + +1. Inspect the tools actually exposed by the host. Their current descriptions + own API names, parameter schemas and authentication behavior. +2. Use `search_seqera_api` with the operation's intent. Read the returned full + schema, including optional fields, nesting and types; suggestions alone may + omit optional launch settings. Resolve workspace/resource IDs from returned + metadata rather than guessing. +3. Use `call_seqera_api` with the discovered service, exact `api_name` and + schema-shaped parameters. This is not a raw HTTP method/endpoint/body API. +4. For mutations, confirm the authorized scope and verify the resulting state + with an authoritative read. Broaden discovery or report a capability gap when + an operation is unavailable; do not fabricate names or mirror API schemas. + +For resume, discover the existing-workflow resume operation and preserve the +original launch/session relationship. A Platform workflow ID is not a Nextflow +session UUID. For saved-pipeline or ad-hoc launch, follow `launch-workflow`'s +relevant procedure and preserve the selected revision, parameters and lineage. + +Use exposed nf-core discovery helpers for module selection and inspect their +input/output contracts. Workspace execution, resource access and artifact +handoff remain host responsibilities; a tool response is not proof that a +container or pipeline ran successfully. diff --git a/tools/import_package.py b/tools/import_package.py index 08f6ff0..c2a2de8 100644 --- a/tools/import_package.py +++ b/tools/import_package.py @@ -14,6 +14,7 @@ import hashlib import json import shutil +import subprocess import sys import tempfile import zipfile @@ -210,6 +211,10 @@ def main() -> None: relicense_portal_files() curate_skills() + subprocess.run([ + sys.executable, "-I", str(REPO / "tools" / "consolidate_skills.py"), + "--root", str(REPO), + ], check=True) review = generic.get("extensions", {}).get("com.openai", {}).get("review", {}).get("test_cases") if review: diff --git a/tools/skill_consolidations.json b/tools/skill_consolidations.json new file mode 100644 index 0000000..1d47237 --- /dev/null +++ b/tools/skill_consolidations.json @@ -0,0 +1,639 @@ +{ + "groups": [ + { + "folds": [ + { + "from": "create-workflow", + "to": "build-nextflow-pipeline", + "heading": "Registry composition playbook", + "when": "When composing multiple Nextflow Registry modules, use the registry path instead of the source-material planning phases.", + "label": "registry composition" + } + ], + "edits": [ + { + "path": "skills/build-nextflow-pipeline/SKILL.md", + "old": "\"build a pipeline\", \"port this to Nextflow\"", + "new": "\"build a pipeline\", \"compose registry modules\", \"port this to Nextflow\"" + }, + { + "path": "skills/build-nextflow-pipeline/SKILL.md", + "old": "# Building a Nextflow pipeline from existing source material", + "new": "# Build a Nextflow Pipeline\n\n## Choose the construction path\n\nFor composing existing Registry modules, read [registry composition](references/create-workflow/README.md) and follow its plan → approval → module validation → composition → end-to-end verification loop. For a single module, use `run-module`; a wrapper workflow is unnecessary.\n\nFor scripts, notebooks, repositories or analysis descriptions, use the source-material phases below. Load `nf-pipeline-design` for code-level rules in either path." + }, + { + "path": "skills/create-container/SKILL.md", + "old": "module here — that belongs in `create-workflow` after verification.", + "new": "module here — that belongs in `build-nextflow-pipeline` after verification." + }, + { + "path": "skills/nextflow-output-patterns/SKILL.md", + "old": "- For `collectFile`'s `storeDir:` / `cache:` / `sort:` parameters (publishing, deduplication), see `create-workflow` § \"publishing outputs\".", + "new": "- For `collectFile`'s `storeDir:` / `cache:` / `sort:` parameters, consult the current official Nextflow operator reference." + }, + { + "path": "skills/nextflow-output-patterns/SKILL.md", + "old": "- For metadata-channel shape design (when meta has multiple keys), see `create-workflow` § \"metadata flow\".", + "new": "- For metadata-channel shape design (when meta has multiple keys), use `nf-pipeline-design`." + } + ] + }, + { + "folds": [ + { + "from": "convert-python-script", + "to": "build-nextflow-pipeline", + "heading": "Python conversion playbook", + "when": "When converting a standalone Python script or Python analysis into Nextflow, preserve its algorithm and dependency contract.", + "label": "Python conversion" + }, + { + "from": "convert-r-script", + "to": "build-nextflow-pipeline", + "heading": "R conversion playbook", + "when": "When converting R source into Nextflow, preserve statistical semantics, dependencies and meaningful task boundaries.", + "label": "R conversion" + }, + { + "from": "convert-jupyter-notebook", + "to": "build-nextflow-pipeline", + "heading": "Notebook conversion playbook", + "when": "When converting a Jupyter notebook, inventory cell dependencies and hidden state before extracting executable steps.", + "label": "notebook conversion" + } + ], + "edits": [ + { + "path": "skills/build-nextflow-pipeline/SKILL.md", + "old": "## Phase 0 — Audit what the source material points at", + "new": "## Conversion contract\n\nFor Python, R or Jupyter source, read the matching conversion playbook before scaffolding. Audit external files, helper code, dependencies and notebook state. Run the source on a small representative fixture when possible and record expected scientific outputs before changing execution structure. If the source cannot run, state that equivalence is unverified.\n\nPreserve tested algorithms by wrapping them. Split only at meaningful independently executable boundaries; file loading or a notebook cell alone does not justify a process. Preserve within-task threading and global/statistical operations. Validate the converted pipeline against the baseline outputs using exact or format-aware/tolerance-based checks appropriate to the algorithm. Compilation and lint alone do not establish equivalence.\n\nUse output syntax supported by the selected Nextflow version and the project's publication contract; legacy examples using `publishDir` are not a reason to undo workflow outputs.\n\n## Phase 0 — Audit what the source material points at" + }, + { + "path": "skills/convert-r-script/SKILL.md", + "old": "Convert an R script into a well-structured Nextflow pipeline. Do NOT simply wrap\nthe script in a single process — decompose it into multiple processes connected\nby channels.", + "new": "Convert R source while preserving statistical behavior. Wrap tested R code when it is one meaningful task; decompose only at independently executable boundaries with explicit inputs and outputs. A shared normalization or model-fitting step must retain the full data context it needs." + }, + { + "path": "skills/convert-r-script/SKILL.md", + "old": "- Each logical step becomes a Nextflow process", + "new": "- Choose meaningful task boundaries; keep cheap file loading/transforms with the analysis when separation adds no useful contract" + }, + { + "path": "skills/convert-r-script/SKILL.md", + "old": "3. Run `nextflow lint` to check best practices", + "new": "3. Run `nextflow lint` to check best practices\n4. Execute representative data and compare scientific outputs against the source baseline; use justified tolerances for numerical results" + }, + { + "path": "skills/convert-r-script/SKILL.md", + "old": "- `nextflow-dsl2.md` — DSL2 process and workflow syntax reference\n- `r-container-images.md` — Common R container images and conda environments", + "new": "- [DSL2 reference](references/nextflow-dsl2.md) — process and workflow syntax\n- [R environments](references/r-container-images.md) — container images and conda packages" + }, + { + "path": "skills/convert-jupyter-notebook/SKILL.md", + "old": "Convert the Jupyter notebook into **multiple Nextflow processes** — do NOT simply wrap the entire notebook in a single process.", + "new": "Identify meaningful executable tasks rather than making each cell a process. Extract shared variables, cell-order dependencies, random state, working-directory changes and interactive assumptions explicitly. Wrap a single coherent analysis when appropriate; split independent tasks only when their file/value contracts are clear." + }, + { + "path": "skills/convert-jupyter-notebook/SKILL.md", + "old": "3. Run `nextflow lint` to check for best practice issues", + "new": "3. Run `nextflow lint` to check for best practice issues\n4. Run representative input through the extracted source and the converted pipeline; compare expected scientific outputs and report any unresolved notebook state" + }, + { + "path": "skills/convert-python-script/SKILL.md", + "old": "| `multiprocessing` | Remove — Nextflow handles parallelism |", + "new": "| `multiprocessing` | Preserve intentional within-task parallelism; let Nextflow schedule independent task instances |" + }, + { + "path": "skills/convert-python-script/SKILL.md", + "old": "1. **Don't parallelize inside the script** — Remove `multiprocessing`, `joblib.Parallel`, `concurrent.futures`. Nextflow parallelizes across process instances.", + "new": "1. **Separate task scheduling from tool threading** — Preserve intentional within-task parallelism and expose resource requirements via `task.cpus`. Nextflow schedules independent instances; it does not replace a tool's internal parallel algorithm." + }, + { + "path": "skills/convert-python-script/SKILL.md", + "old": "- [ ] String interpolation escaped correctly (`\\$` for shell/Python vars)", + "new": "- [ ] String interpolation escaped correctly (`\\$` for shell/Python vars)\n- [ ] Representative execution matches the source's expected scientific outputs, using justified numerical tolerances when needed" + } + ] + }, + { + "folds": [ + { + "from": "triage-pipeline-parameters", + "to": "nextflow-schema", + "heading": "Source-material parameter triage", + "when": "When deriving parameters from scripts, notebooks, papers or CLI documentation, produce the source audit, schema, config outline and representative test-input manifest.", + "label": "parameter triage" + }, + { + "from": "nf-schema-migration", + "to": "nextflow-schema", + "heading": "Legacy schema migration", + "when": "When upgrading nf-validation or draft-07 schemas, preserve validation, samplesheet tuple shape, help behavior and representative execution.", + "label": "schema migration" + } + ], + "edits": [ + { + "path": "skills/nextflow-schema/SKILL.md", + "old": " and nf-schema v2 (JSON Schema 2020-12) compliance.", + "new": " nf-schema v2 (JSON Schema 2020-12) compliance, source-material parameter triage,\n and migration from nf-validation or draft-07 schemas." + }, + { + "path": "skills/nextflow-schema/SKILL.md", + "old": "## Discovering parameters from raw source material", + "new": "## Discovering parameters from raw source material\n\nRead [parameter triage](references/triage-pipeline-parameters/README.md) for the bounded source-audit task, including the config outline and representative test-input manifest." + }, + { + "path": "skills/nextflow-schema/SKILL.md", + "old": "For migrating existing pipelines from nf-validation to nf-schema, see the `nf-schema-migration` skill.", + "new": "For migrating existing pipelines from nf-validation to nf-schema, read [schema migration](references/nf-schema-migration/README.md) before editing. Schema syntax validation alone does not prove samplesheet or pipeline equivalence." + }, + { + "path": "skills/nf-schema-migration/SKILL.md", + "old": "Consult the bundled migration-guide.md reference for additional migration details.", + "new": "Consult [migration details](references/migration-guide.md) for legacy keyword examples. This is a historical reference: verify current nf-core tooling compatibility rather than treating its dated support warning as current." + } + ] + }, + { + "folds": [ + { + "from": "repair-nf-test", + "to": "nf-test", + "heading": "Failure repair playbook", + "when": "When an existing nf-test fails, classify intentional contract change, regression, nondeterminism or infrastructure before editing code, assertions or snapshots.", + "label": "nf-test failure repair" + } + ], + "edits": [ + { + "path": "skills/nf-test/SKILL.md", + "old": "Use repair-nf-test for structured diagnosis of existing failures.", + "new": "For failing suites, assertion errors or snapshot mismatches, read [nf-test failure repair](references/repair-nf-test/README.md) before changing code or expectations. Preserve fixtures unless a reviewed intentional contract change justifies updating them." + }, + { + "path": "skills/nf-test/SKILL.md", + "old": "Treat failures as evidence. Check missing inputs, tuple shape, profile availability, container access, resource requirements, and actual assertion differences before changing pipeline logic.", + "new": "Treat failures as evidence. Read [nf-test failure repair](references/repair-nf-test/README.md) to distinguish regression from an intentional contract change. Check missing inputs, tuple shape, profile availability, container access, resource requirements, and actual assertion differences before changing pipeline logic." + }, + { + "path": "skills/repair-nf-test/SKILL.md", + "old": "Action: update the snapshot or assertion to match the new correct behavior.", + "new": "Action: update the snapshot or assertion only after checking the intentional contract change against independent expected behavior. Select the affected test using the project's supported selector before passing `--update-snapshot`; the command below shows the flag, not a suite-wide update instruction." + } + ] + }, + { + "folds": [ + { + "from": "nf-debug", + "to": "repair-workflow", + "heading": "Static diagnostics playbook", + "when": "When the request concerns lint, config validation, compilation or why a pipeline will not start, use static diagnostics and honor whether the user requested diagnosis or repair.", + "label": "static diagnostics" + } + ], + "edits": [ + { + "path": "skills/repair-workflow/SKILL.md", + "old": " the right validation loop matters more than writing new workflow structure.", + "new": " the right validation loop matters more than writing new workflow structure.\n Also use for pipeline lint, config validation and preview/compilation diagnostics." + }, + { + "path": "skills/repair-workflow/SKILL.md", + "old": "Repair the user's existing workflow in place. Work with the files, modules, tests, and validation commands the user supplies rather than assuming a repository layout.", + "new": "Diagnose or repair the user's existing workflow in place. Work with the supplied files, modules, tests and validation commands rather than assuming a repository layout. A diagnosis or lint request authorizes inspection and reporting, not automatic source edits." + }, + { + "path": "skills/repair-workflow/SKILL.md", + "old": "## Choose the Validation Loop", + "new": "## Choose the Validation Loop\n\nFor syntax/config/compilation failures, read [static diagnostics](references/nf-debug/README.md). For executed failures, use `debug-local-run` or `debug-seqera-failed-run`; for test expectations, use `nf-test`. Static diagnostics supplement representative execution and cannot prove output correctness." + }, + { + "path": "skills/nf-debug/SKILL.md", + "old": "Run three diagnostic passes, fix issues found, re-run until clean.", + "new": "Run supported diagnostic passes and report evidence. Apply fixes only when the user's request authorizes repair, then re-run the affected checks. Check the installed Nextflow version/help before using version-dependent commands." + }, + { + "path": "skills/nf-debug/SKILL.md", + "old": "Validates config files merge correctly. Look for unresolved params, profile conflicts, duplicate keys.", + "new": "Lists available profiles. Inspect the merged configuration for the selected pipeline/profile separately to diagnose unresolved parameters, profile conflicts and duplicate settings. Profile listing alone does not prove the intended configuration is correct." + }, + { + "path": "skills/nf-debug/SKILL.md", + "old": "3. Fix issues directly in source files.", + "new": "3. Report the diagnosis; if repair was requested, make the smallest evidence-based source edit." + }, + { + "path": "skills/nf-debug/SKILL.md", + "old": "5. Repeat until all three pass clean.", + "new": "5. Report which supported checks passed, failed or could not run. For a repair, run representative tests/output checks as well; static success is not runtime verification." + } + ] + }, + { + "folds": [ + { + "from": "nf-run-history", + "to": "nextflow-history", + "heading": "Narrative history analysis", + "when": "When the user wants a recap, recurring failure patterns or how a pipeline evolved over time, analyze the selected records and explain gaps without inferring causality from timing alone.", + "label": "narrative run-history analysis" + } + ], + "edits": [ + { + "path": "skills/nextflow-history/SKILL.md", + "old": " Uses run history, task cache metadata, and Nextflow logs supplied by the user.", + "new": " Uses run history, task cache metadata, and Nextflow logs supplied by the user.\n Also use for narrative recaps, recurring failures and pipeline evolution." + }, + { + "path": "skills/nextflow-history/SKILL.md", + "old": "## Reporting", + "new": "## Reporting\n\nFor a narrative recap or recurring patterns, read [narrative run-history analysis](references/nf-run-history/README.md). First establish the selected environment, time range and completeness of the records. Use logs/trace evidence to distinguish confirmed causes from correlations." + } + ] + }, + { + "folds": [ + { + "from": "nextflow-26-syntax", + "to": "migrate-nextflow-code", + "heading": "Strict syntax compatibility reference", + "when": "When fixing v2 parser errors or planning staged modernization, consult the version-specific syntax rules and preserve a tested output baseline.", + "label": "strict syntax compatibility" + }, + { + "from": "nf-v2-boolean-params", + "to": "migrate-nextflow-code", + "heading": "Boolean parameter compatibility reference", + "when": "When CLI boolean flags arrive with the wrong type or do not toggle under strict syntax, check the typed-parameter and schema contract.", + "label": "boolean parameter compatibility" + }, + { + "from": "nf-migrate-25-04", + "to": "migrate-nextflow-code", + "heading": "Nextflow 25.04 compatibility reference", + "when": "When targeting 25.04 or diagnosing compatibility across that release, use its changelog and scanners without assuming 26.x features.", + "label": "25.04 compatibility" + } + ], + "edits": [ + { + "path": "skills/migrate-nextflow-code/SKILL.md", + "old": "description: Migrate Nextflow pipeline code to newer language requirements. Use when fixing strict syntax errors, replacing versions channels with topic channels, migrating from `publishDir` to workflow outputs (the `output {}` block), or adding static typing (typed processes/workflows, records, typed params).", + "new": "description: Migrate Nextflow pipeline code while preserving behavior. Use for version upgrades including 25.04 compatibility, strict syntax errors, boolean CLI parameter types, topic channels, workflow outputs, and static typing (typed processes/workflows, records, typed params)." + }, + { + "path": "skills/migrate-nextflow-code/SKILL.md", + "old": "**Requires Nextflow 26.04 or later** (for the `nextflow lint` command and the strict syntax parser, which is the default from 26.04 onward).", + "new": "**Resolve the installed and target Nextflow versions first.** The modern examples target 26.04+, where strict syntax is the default. For a 25.04 target, read [25.04 compatibility](references/nf-migrate-25-04/README.md) and its scanners; do not silently upgrade the runtime or apply newer syntax. Check installed help/current official migration notes before using version-dependent features." + }, + { + "path": "skills/migrate-nextflow-code/SKILL.md", + "old": "| **Strict syntax** | …has strict syntax errors, or asks to run `nextflow lint` to find and fix errors | `strict-syntax.md` |", + "new": "| **25.04 compatibility** | …targets 25.04 or crosses that release | [25.04 compatibility](references/nf-migrate-25-04/README.md) |\n| **Boolean CLI params** | …has a string/boolean type mismatch or a flag that does not toggle | [boolean parameter compatibility](references/nf-v2-boolean-params/README.md) |\n| **Strict syntax** | …has parser errors or asks to run `nextflow lint` | `strict-syntax.md`, plus [version-specific rules](references/nextflow-26-syntax/README.md) |" + }, + { + "path": "skills/migrate-nextflow-code/SKILL.md", + "old": "If the request covers multiple migrations, recommend performing only the first matching migration in the table. The order is also a dependency order: strict syntax -> topic channels -> static typing -> workflow outputs. Do not try to perform multiple migrations at the same time.", + "new": "For multiple requested migrations, agree a staged plan based on the target release and project dependencies. Establish a working baseline first, then complete one stage at a time with lint, representative tests and output comparisons. Strict syntax normally comes first; topic channels, types and workflow outputs need only be adopted when requested and supported. A green stage is the stopping point if the next cannot be verified." + }, + { + "path": "skills/nf-migrate-25-04/SKILL.md", + "old": "Full upstream changelog: `upstream-25-04.md`", + "new": "Full upstream changelog: [25.04 release notes](references/upstream-25-04.md). This reference applies to that target release; verify version-dependent commands against installed help." + }, + { + "path": "skills/nf-migrate-25-04/SKILL.md", + "old": "the user-provided source files with the host's execution tools.", + "new": "the user-provided source files with the host's execution tools: [deprecated-pattern scanner](scripts/find_deprecated_patterns.py)." + }, + { + "path": "skills/nf-migrate-25-04/SKILL.md", + "old": "For shell blocks only, use the bundled `find_shell_blocks.py` helper if available.", + "new": "For shell blocks only, use the [shell-block scanner](scripts/find_shell_blocks.py)." + }, + { + "path": "skills/nf-migrate-25-04/SKILL.md", + "old": "See `upstream-25-04.md` § Miscellaneous for the full list.", + "new": "See [25.04 release notes](references/upstream-25-04.md) § Miscellaneous for the full list." + }, + { + "path": "skills/nextflow-26-syntax/SKILL.md", + "old": "- `nf-v2-boolean-params` — focused deep-dive on boolean CLI params under strict syntax. **Load this skill alone for general v2 migration; pair with `nf-v2-boolean-params` when the task also involves a boolean flag that's not toggling.**", + "new": "- `nf-v2-boolean-params` — read the boolean compatibility reference when the task also involves a flag that is not toggling; otherwise keep the syntax investigation scoped to the observed parser errors." + }, + { + "path": "skills/nf-v2-boolean-params/SKILL.md", + "old": "**Load together with this skill when the task touches multiple v2 grammar rules; load this one alone when the failure is specifically about a boolean CLI param.**", + "new": "Read the syntax compatibility reference when the task touches multiple grammar rules; keep boolean-only failures scoped to this reference." + } + ] + }, + { + "folds": [ + { + "from": "seqera-mcp", + "to": "launch-workflow", + "heading": "MCP connection reference", + "when": "When a Seqera connection is missing or operation discovery is unclear, use the shared connection reference. Otherwise rely on the live tool descriptions and returned schemas.", + "label": "MCP connection", + "guide_override": "curation/mcp-connection.md", + "drop": [ + "references/tool-schemas.md" + ] + } + ], + "edits": [ + { + "path": "skills/audit-conversion-readiness/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/build-nextflow-pipeline/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/build-nextflow-pipeline/references/convert-jupyter-notebook/README.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/build-nextflow-pipeline/references/convert-python-script/README.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/build-nextflow-pipeline/references/convert-r-script/README.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/build-nextflow-pipeline/references/create-workflow/README.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/ce-credentials-setup/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/create-container/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/debug-local-run/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/debug-seqera-failed-run/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/find-alternative-tools/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/install-nextflow/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/launch-workflow/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/maintain-nf-core-pipeline/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/migrate-from-snakemake/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/migrate-nextflow-code/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/migrate-nextflow-code/references/nextflow-26-syntax/README.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/migrate-nextflow-code/references/nf-migrate-25-04/README.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/migrate-nextflow-code/references/nf-v2-boolean-params/README.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/nextflow-config/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/nextflow-development/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/nextflow-history/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/nextflow-history/references/nf-run-history/README.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/nextflow-output-patterns/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/nextflow-schema/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/nextflow-schema/references/nf-schema-migration/README.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/nextflow-schema/references/triage-pipeline-parameters/README.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/nf-data-lineage/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/nf-docker-scripts/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/nf-pipeline-design/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/nf-plugin-development/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/nf-plugin-legacy-migration/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/nf-test/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/nf-test/references/repair-nf-test/README.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/repair-workflow/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/repair-workflow/references/nf-debug/README.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/run-module/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/search-existing-modules/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/seqera-data-links/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/seqerakit/SKILL.md", + "old": "For Seqera operations, use the `seqera-mcp` skill.", + "new": "For Seqera operations, read the `seqera-mcp` connection reference." + }, + { + "path": "skills/seqera-data-links/SKILL.md", + "old": "Use the `seqera-mcp` skill for the connection and discovery pattern.", + "new": "Read the `seqera-mcp` connection reference for discovery and authentication." + }, + { + "path": "skills/ce-credentials-setup/SKILL.md", + "old": "**This skill complements `seqera-mcp`** — it covers HOW to gather values, while `seqera-mcp` covers HOW to call the creation tools.", + "new": "Read the `seqera-mcp` connection reference for discovery and authentication. This skill owns provider prerequisites and compute readiness." + }, + { + "path": "skills/ce-credentials-setup/SKILL.md", + "old": "via seqera-mcp (skip for Seqera Compute)", + "new": "through discovered MCP operations (skip for Seqera Compute)" + }, + { + "path": "skills/ce-credentials-setup/SKILL.md", + "old": "via seqera-mcp", + "new": "through discovered MCP operations" + }, + { + "path": "skills/ce-credentials-setup/references/kubernetes.md", + "old": "Using the seqera-mcp tool:", + "new": "Discover the credential-creation operation with `search_seqera_api` and execute it through `call_seqera_api`. The example below describes intent; use the current returned schema, not these illustrative field names:" + }, + { + "path": "skills/nextflow-history/SKILL.md", + "old": "use `seqera-mcp` to discover the relevant workflow-listing operation.", + "new": "use MCP discovery/execution to retrieve workflows; read `seqera-mcp` if connection or discovery guidance is needed." + } + ] + } + ], + "post_edits": [ + { + "path": "skills/build-nextflow-pipeline/SKILL.md", + "old": "### Implement branching between as many alternative tools as possible\n\nFor each subworkflow, explicitly list the alternative tools considered (e.g. for multiple sequence alignment: MAFFT, MUSCLE, Clustal Omega, T-Coffee, HHblits; for folding: Boltz, OpenFold3, AlphaFold3) and then **implement the branching between them in the subworkflow**, not just pick one.\n\nThe default assumption is that every step with multiple credible tools becomes a workflow-level `if/else` on an explicit parameter, with each branch calling one module. This is not a \"nice to have\" — it's what makes the pipeline actually useful:\n\n- The original source material reflects *one* author's choice at *one* point in time. Alternatives are often better for other datasets, other organisms, other budgets, or simply newer than the paper.\n- Tool choice is typically the single biggest determinant of output quality and runtime. Exposing it as a knob turns the pipeline into an experiment platform instead of a fixed recipe.\n- Adding a second branch is cheap when you're writing the subworkflow; adding one later means reworking the subworkflow's input/output contracts under pressure.\n- You are going through the container/module-building loop anyway (Phase 4). Doing it for 2–4 tools in one pass is only marginally more work than doing it for one.\n\nConcretely, this means:\n\n1. Surface the tool choice as a parameter in `nextflow_schema.json` with an `enum` listing every implemented option (see Phase 1 — this is exactly the kind of knob that belongs at the top level).\n2. Structure the subworkflow as a workflow-level `if/else` over that parameter, with a final `else error \"Unsupported : ${choice}\"` branch. See the `RUN_FOLDING` example in `nf-pipeline-design` for the exact shape.\n3. Harmonize inputs *upstream* of the branch and outputs *downstream* of the branch, so each tool module sees the same input shape and emits the same output shape. The subworkflow, not the caller, owns this normalization.\n4. Build and verify containers for **every** implemented branch during Phase 4. A branch that exists in code but was never run once is technical debt, not a feature.\n\nSkip a branch only when the tool is genuinely obsolete, proprietary-licensed in a way the pipeline cannot accept, or architecturally incompatible (e.g. needs GPUs the target executor doesn't have). Record the reason for every tool you considered and did *not* implement — this document survives longer than the planning conversation and prevents the same alternative being revisited every six months.\n\n**Delegate the enumeration when available.** For each analysis step in the data flow map, use the `find-alternative-tools` skill with the analysis step name plus any constraints (target executor, GPU availability, license restrictions). These tasks are independent and can run in parallel with one subagent per analysis step. Collect the ranked lists back into the planning document's \"Alternative tools\" section.\n\nThen **merge the suggested `enum` values into `nextflow_schema.json`** for each tool-choice parameter (e.g. `msa_tool: [\"mafft\", \"muscle\", \"clustalo\"]`). This is the first planned augmentation of the schema after Phase 1's draft — update `nextflow.config`'s `params {}` block alongside so defaults stay in sync. Also note any **nf-core module hints** the enumerate subagents flagged in their per-tool blocks; you will pass those forward to the next step as fast-path hints.\n\n", + "new": "### Select tools without expanding scope\n\nUse the tool requested by the user or required to preserve the source analysis. If none is specified, recommend one suitable default and resolve material license, compute or output-contract constraints before implementation.\n\nUse `find-alternative-tools` only when the user requests a comparison or the selected tool is blocked. Research produces candidates; it does not authorize implementing them.\n\nAdd multiple tool branches only when the user explicitly requests or approves them. For approved branches:\n\n1. Add only implemented choices to the schema's `enum`, keeping config defaults aligned.\n2. Put tool selection in the subworkflow and reject unsupported choices explicitly.\n3. Normalize inputs and outputs around the selected modules.\n4. Verify every implemented branch's command, container and representative outputs.\n\nRecord the selected tool and rationale. A single-tool pipeline does not need an alternative-tool parameter or exhaustive rejected-tool inventory.\n\n" + }, + { + "path": "skills/build-nextflow-pipeline/SKILL.md", + "old": "| Enumerating alternative tools for each analysis step | **Yes — one subagent per analysis step, in parallel** | `find-alternative-tools` |", + "new": "| Comparing alternatives, only when requested or the selected tool is blocked | **Optional** — delegate the bounded comparison when useful | `find-alternative-tools` |" + }, + { + "path": "skills/build-nextflow-pipeline/SKILL.md", + "old": "augmented in Phase 3 with `enum` values from `find-alternative-tools` and any new tool-argument parameters revealed by module search.", + "new": "augmented in Phase 3 with approved implemented tool choices (if any) and relevant tool arguments revealed by module search." + }, + { + "path": "skills/build-nextflow-pipeline/SKILL.md", + "old": "`enum` values after tool enumeration", + "new": "`enum` values for approved implemented alternatives" + }, + { + "path": "skills/build-nextflow-pipeline/SKILL.md", + "old": "For every tool chosen as a branch, search for existing implementations", + "new": "For each selected tool, search for existing implementations" + }, + { + "path": "skills/build-nextflow-pipeline/SKILL.md", + "old": "data flow map, samplesheet design, channels, alternative tools, module sourcing, test inputs, container verification", + "new": "data flow map, samplesheet design, channels, selected tools (alternatives only if requested), module sourcing, test inputs, container verification" + }, + { + "path": "skills/build-nextflow-pipeline/SKILL.md", + "old": "- [ ] `nextflow_schema.json` is available to the user's pipeline, with defaults, descriptions, and `enum` values merged in after alternative-tool enumeration", + "new": "- [ ] `nextflow_schema.json` is available with defaults and descriptions; any tool-choice `enum` lists only approved implemented branches" + }, + { + "path": "skills/build-nextflow-pipeline/SKILL.md", + "old": "- [ ] Alternative-tool enumeration ran for every analysis step with credible alternatives, using `find-alternative-tools`", + "new": "- [ ] The selected tools match the requested analysis; any additional implemented branches were explicitly requested or approved" + }, + { + "path": "skills/find-alternative-tools/SKILL.md", + "old": "Output is a structured list designed to feed directly into Nextflow subworkflow branching decisions.", + "new": "Output is a structured comparison to inform tool selection; research does not authorize implementation of additional branches." + }, + { + "path": "skills/find-alternative-tools/SKILL.md", + "old": "The caller wants to turn \"do MSA\" into a subworkflow with `if/else` over a `msa_tool` parameter, with multiple real branches. That means you are *not* choosing one winner — you are enumerating every tool a reasonable pipeline author would consider exposing as an option, and giving the caller what they need to pick which branches to implement.", + "new": "Compare credible tools for the requested analysis and constraints. Recommend one default and explain when alternatives are justified. The caller decides which candidate to use; implementing additional branches requires explicit user approval. An alternatives report is research, not a pipeline implementation plan." + }, + { + "path": "skills/find-alternative-tools/SKILL.md", + "old": "Suggest the `enum` value set for the schema parameter (e.g. `msa_tool: enum [mafft, muscle, clustalo, tcoffee, hhblits]`). Use short, lowercase, conventional names — whatever the tool's own CLI command is, typically.", + "new": "Suggest schema `enum` values only for branches explicitly approved for implementation. A research shortlist must not become the pipeline's advertised supported choices. Use short, lowercase, conventional tool names for approved choices." + } + ] +} diff --git a/tools/test_consolidate_skills.py b/tools/test_consolidate_skills.py new file mode 100644 index 0000000..30c98c8 --- /dev/null +++ b/tools/test_consolidate_skills.py @@ -0,0 +1,120 @@ +"""Exercise the consolidation CLI against independent package fixtures.""" + +import hashlib +import json +import subprocess +import sys +import tempfile +import unittest +from pathlib import Path + +CLI = Path(__file__).with_name("consolidate_skills.py") + + +class ConsolidationTests(unittest.TestCase): + def setUp(self): + self.tmp = tempfile.TemporaryDirectory() + self.addCleanup(self.tmp.cleanup) + self.root = Path(self.tmp.name) + files = { + "skills/old/SKILL.md": "---\nname: old\ndescription: Original task\n---\n# Original task\n\nRead [details](references/details.md).\n", + "skills/old/references/details.md": "Preserve scheduler semantics.\n", + "skills/old/scripts/check.sh": "#!/bin/sh\nprintf 'checked\\n'\n", + "skills/owner/SKILL.md": "---\nname: owner\ndescription: Current task\n---\n# Current task\n", + "skills/caller/SKILL.md": "---\nname: caller\ndescription: Call old when needed\n---\nUse `old` for this task.\n", + } + entries = [] + for relative, text in files.items(): + path = self.root / relative + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(text) + entries.append({"path": relative, "source": f"upstream/{relative}", + "source_sha256": hashlib.sha256(text.encode()).hexdigest(), + "bundled_sha256": hashlib.sha256(text.encode()).hexdigest(), "override": False}) + (self.root / "sources.json").write_text(json.dumps({"files": entries, "claude_curation": {"edited_files": []}})) + self.plan = self.root / "plan.json" + self.plan.write_text(json.dumps({"groups": [{"folds": [{"from": "old", "to": "owner", "heading": "Original task playbook", "when": "When doing the original task.", "label": "original task"}]}]})) + + def run_cli(self): + return subprocess.run([sys.executable, "-I", str(CLI), "--root", str(self.root), "--plan", str(self.plan)], capture_output=True, text=True) + + def test_moves_assets_and_routes_callers_with_original_provenance(self): + result = self.run_cli() + self.assertEqual(result.returncode, 0, result.stderr) + self.assertFalse((self.root / "skills/old").exists()) + guide = self.root / "skills/owner/references/old/README.md" + self.assertEqual(guide.read_text(), "# Original task\n\nRead [details](references/details.md).\n") + self.assertEqual((guide.parent / "references/details.md").read_text(), "Preserve scheduler semantics.\n") + self.assertEqual((guide.parent / "scripts/check.sh").read_text(), "#!/bin/sh\nprintf 'checked\\n'\n") + self.assertIn("[original task](references/old/README.md)", (self.root / "skills/owner/SKILL.md").read_text()) + caller = (self.root / "skills/caller/SKILL.md").read_text() + self.assertIn("description: Call owner when needed", caller) + self.assertIn("[original task](../owner/references/old/README.md)", caller) + sources = json.loads((self.root / "sources.json").read_text()) + moved = next(entry for entry in sources["files"] if entry["path"] == "skills/owner/references/old/README.md") + self.assertEqual(moved["source"], "upstream/skills/old/SKILL.md") + for entry in sources["files"]: + self.assertEqual(entry["bundled_sha256"], hashlib.sha256((self.root / entry["path"]).read_bytes()).hexdigest()) + + def test_rebases_external_links_and_keeps_internal_asset_links(self): + original = self.root / "skills/old/SKILL.md" + original.write_text(original.read_text() + "\nRead [current task](../owner/SKILL.md#workflow).\n") + result = self.run_cli() + self.assertEqual(result.returncode, 0, result.stderr) + guide = self.root / "skills/owner/references/old/README.md" + self.assertIn("[current task](../../SKILL.md#workflow)", guide.read_text()) + self.assertIn("[details](references/details.md)", guide.read_text()) + self.assertTrue((guide.parent / "../../SKILL.md").resolve().is_file()) + + def test_short_reference_replaces_guide_and_drops_mirrored_schema(self): + (self.root / "connection.md").write_text("# Connection\n\nUse live tool schemas.\n") + plan = json.loads(self.plan.read_text()) + fold = plan["groups"][0]["folds"][0] + fold["guide_override"] = "connection.md" + fold["drop"] = ["references/details.md"] + self.plan.write_text(json.dumps(plan)) + result = self.run_cli() + self.assertEqual(result.returncode, 0, result.stderr) + destination = self.root / "skills/owner/references/old" + self.assertEqual((destination / "README.md").read_text(), "# Connection\n\nUse live tool schemas.\n") + self.assertFalse((destination / "references/details.md").exists()) + sources = json.loads((self.root / "sources.json").read_text()) + self.assertNotIn("skills/owner/references/old/references/details.md", [entry["path"] for entry in sources["files"]]) + self.assertTrue((destination / "scripts/check.sh").is_file()) + + def test_replaying_a_completed_plan_is_a_noop(self): + self.assertEqual(self.run_cli().returncode, 0) + before = {str(path.relative_to(self.root)): path.read_bytes() for path in self.root.rglob("*") if path.is_file()} + self.assertEqual(self.run_cli().returncode, 0) + after = {str(path.relative_to(self.root)): path.read_bytes() for path in self.root.rglob("*") if path.is_file()} + self.assertEqual(after, before) + + def test_behavioral_edit_is_applied_and_replayable(self): + plan = json.loads(self.plan.read_text()) + plan["post_edits"] = [{"path": "skills/owner/SKILL.md", "old": "# Current task", "new": "# Scoped task"}] + self.plan.write_text(json.dumps(plan)) + self.assertEqual(self.run_cli().returncode, 0) + self.assertIn("# Scoped task", (self.root / "skills/owner/SKILL.md").read_text()) + before = (self.root / "sources.json").read_bytes() + self.assertEqual(self.run_cli().returncode, 0) + self.assertEqual((self.root / "sources.json").read_bytes(), before) + + def test_missing_source_and_guide_fails_explicitly(self): + import shutil + shutil.rmtree(self.root / "skills/old") + result = self.run_cli() + self.assertNotEqual(result.returncode, 0) + self.assertIn("missing source skill and consolidated guide: old", result.stderr) + + def test_upstream_edit_drift_fails_explicitly(self): + plan = json.loads(self.plan.read_text()) + plan["groups"][0]["edits"] = [{"path": "skills/owner/SKILL.md", "old": "No longer in the upstream source", "new": "Replacement"}] + self.plan.write_text(json.dumps(plan)) + result = self.run_cli() + self.assertNotEqual(result.returncode, 0) + self.assertIn("must match exactly once", result.stderr) + self.assertTrue((self.root / "skills/old/SKILL.md").is_file()) + + +if __name__ == "__main__": + unittest.main()