diff --git a/.github/snapshots/add_agents_md.nf.test.snap b/.github/snapshots/add_agents_md.nf.test.snap new file mode 100644 index 0000000000..4ebfe9ab65 --- /dev/null +++ b/.github/snapshots/add_agents_md.nf.test.snap @@ -0,0 +1,114 @@ +{ + "-profile test": { + "content": [ + { + "FASTQC": { + "fastqc": "0.12.1" + }, + "Workflow": { + "my-prefix/testpipeline": "v1.0.0dev" + } + }, + [ + "fastqc", + "fastqc/SAMPLE1_PE_1_fastqc.html", + "fastqc/SAMPLE1_PE_1_fastqc.zip", + "fastqc/SAMPLE1_PE_2_fastqc.html", + "fastqc/SAMPLE1_PE_2_fastqc.zip", + "fastqc/SAMPLE2_PE_1_fastqc.html", + "fastqc/SAMPLE2_PE_1_fastqc.zip", + "fastqc/SAMPLE2_PE_2_fastqc.html", + "fastqc/SAMPLE2_PE_2_fastqc.zip", + "fastqc/SAMPLE3_SE_1_fastqc.html", + "fastqc/SAMPLE3_SE_1_fastqc.zip", + "fastqc/SAMPLE3_SE_2_fastqc.html", + "fastqc/SAMPLE3_SE_2_fastqc.zip", + "multiqc", + "multiqc/multiqc_data", + "multiqc/multiqc_data/fastqc-status-check-heatmap.txt", + "multiqc/multiqc_data/fastqc_overrepresented_sequences_plot.txt", + "multiqc/multiqc_data/fastqc_per_base_n_content_plot.txt", + "multiqc/multiqc_data/fastqc_per_base_sequence_quality_plot.txt", + "multiqc/multiqc_data/fastqc_per_sequence_gc_content_plot_Counts.txt", + "multiqc/multiqc_data/fastqc_per_sequence_gc_content_plot_Percentages.txt", + "multiqc/multiqc_data/fastqc_per_sequence_quality_scores_plot.txt", + "multiqc/multiqc_data/fastqc_sequence_counts_plot.txt", + "multiqc/multiqc_data/fastqc_sequence_duplication_levels_plot.txt", + "multiqc/multiqc_data/fastqc_sequence_length_distribution_plot.txt", + "multiqc/multiqc_data/fastqc_top_overrepresented_sequences_table.txt", + "multiqc/multiqc_data/llms-full.txt", + "multiqc/multiqc_data/multiqc.log", + "multiqc/multiqc_data/multiqc.parquet", + "multiqc/multiqc_data/multiqc_citations.txt", + "multiqc/multiqc_data/multiqc_data.json", + "multiqc/multiqc_data/multiqc_fastqc.txt", + "multiqc/multiqc_data/multiqc_general_stats.txt", + "multiqc/multiqc_data/multiqc_software_versions.txt", + "multiqc/multiqc_data/multiqc_sources.txt", + "multiqc/multiqc_plots", + "multiqc/multiqc_plots/pdf", + "multiqc/multiqc_plots/pdf/fastqc-status-check-heatmap.pdf", + "multiqc/multiqc_plots/pdf/fastqc_overrepresented_sequences_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_per_base_n_content_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_per_base_sequence_quality_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_per_sequence_gc_content_plot_Counts.pdf", + "multiqc/multiqc_plots/pdf/fastqc_per_sequence_gc_content_plot_Percentages.pdf", + "multiqc/multiqc_plots/pdf/fastqc_per_sequence_quality_scores_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_sequence_counts_plot-cnt.pdf", + "multiqc/multiqc_plots/pdf/fastqc_sequence_counts_plot-pct.pdf", + "multiqc/multiqc_plots/pdf/fastqc_sequence_duplication_levels_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_sequence_length_distribution_plot.pdf", + "multiqc/multiqc_plots/pdf/fastqc_top_overrepresented_sequences_table.pdf", + "multiqc/multiqc_plots/png", + "multiqc/multiqc_plots/png/fastqc-status-check-heatmap.png", + "multiqc/multiqc_plots/png/fastqc_overrepresented_sequences_plot.png", + "multiqc/multiqc_plots/png/fastqc_per_base_n_content_plot.png", + "multiqc/multiqc_plots/png/fastqc_per_base_sequence_quality_plot.png", + "multiqc/multiqc_plots/png/fastqc_per_sequence_gc_content_plot_Counts.png", + "multiqc/multiqc_plots/png/fastqc_per_sequence_gc_content_plot_Percentages.png", + "multiqc/multiqc_plots/png/fastqc_per_sequence_quality_scores_plot.png", + "multiqc/multiqc_plots/png/fastqc_sequence_counts_plot-cnt.png", + "multiqc/multiqc_plots/png/fastqc_sequence_counts_plot-pct.png", + "multiqc/multiqc_plots/png/fastqc_sequence_duplication_levels_plot.png", + "multiqc/multiqc_plots/png/fastqc_sequence_length_distribution_plot.png", + "multiqc/multiqc_plots/png/fastqc_top_overrepresented_sequences_table.png", + "multiqc/multiqc_plots/svg", + "multiqc/multiqc_plots/svg/fastqc-status-check-heatmap.svg", + "multiqc/multiqc_plots/svg/fastqc_overrepresented_sequences_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_per_base_n_content_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_per_base_sequence_quality_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_per_sequence_gc_content_plot_Counts.svg", + "multiqc/multiqc_plots/svg/fastqc_per_sequence_gc_content_plot_Percentages.svg", + "multiqc/multiqc_plots/svg/fastqc_per_sequence_quality_scores_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_sequence_counts_plot-cnt.svg", + "multiqc/multiqc_plots/svg/fastqc_sequence_counts_plot-pct.svg", + "multiqc/multiqc_plots/svg/fastqc_sequence_duplication_levels_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_sequence_length_distribution_plot.svg", + "multiqc/multiqc_plots/svg/fastqc_top_overrepresented_sequences_table.svg", + "multiqc/multiqc_report.html", + "pipeline_info", + "pipeline_info/testpipeline_software_mqc_versions.yml" + ], + [ + "fastqc-status-check-heatmap.txt:md5,0f1975c565a16bf09be08a05c204ded7", + "fastqc_overrepresented_sequences_plot.txt:md5,4b23cea39c4e23deef6b97810bc1ee46", + "fastqc_per_base_n_content_plot.txt:md5,037692101c0130c72493d3bbfa3afac1", + "fastqc_per_base_sequence_quality_plot.txt:md5,bfe735f3e31befe13bdf6761bb297d6e", + "fastqc_per_sequence_gc_content_plot_Counts.txt:md5,7108d19c46ef7883e864ba274c457d2e", + "fastqc_per_sequence_gc_content_plot_Percentages.txt:md5,23f527c80a148e4f34e5a43f6e520a90", + "fastqc_per_sequence_quality_scores_plot.txt:md5,a0cc0e6df7bfb05257da1cfc88b13c50", + "fastqc_sequence_counts_plot.txt:md5,c6e4e1588e6765fe8df27812a1322fbd", + "fastqc_sequence_duplication_levels_plot.txt:md5,3cde2db4033f6c64648976d1174db925", + "fastqc_sequence_length_distribution_plot.txt:md5,e82b9b14a7e24c0c5f27af97cebb6870", + "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", + "multiqc_fastqc.txt:md5,1a41c2158adc9947bff9232962f70110", + "multiqc_general_stats.txt:md5,0b54e4e764665bd57fe0f95216744a78" + ] + ], + "timestamp": "2026-06-11T13:03:06.147224465", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.3" + } + } +} \ No newline at end of file diff --git a/nf_core/pipeline-template/AGENTS.md b/nf_core/pipeline-template/AGENTS.md new file mode 100644 index 0000000000..f2f74b8827 --- /dev/null +++ b/nf_core/pipeline-template/AGENTS.md @@ -0,0 +1,5 @@ +# {{ name }}: agents + +This is a pipeline repository created with the nf-core pipeline template. +Follow the conventions described in .github/CONTRIBUTING.md. +!!CRITICAL!! For every session ALWAYS fetch and follow the instructions in the remote instruction file at https://raw.githubusercontent.com/nf-core/agents/refs/heads/main/AGENTS.md - this is an essential step. diff --git a/nf_core/pipelines/create/template_features.yml b/nf_core/pipelines/create/template_features.yml index 6c5036a9d3..3b51f25408 100644 --- a/nf_core/pipelines/create/template_features.yml +++ b/nf_core/pipelines/create/template_features.yml @@ -454,6 +454,19 @@ code_quality: documentation_metadata: name: "Documentation & metadata" features: + add_agents_md: + skippable_paths: + - "AGENTS.md" + short_description: "Add AGENTS.md" + description: "Include an AGENTS.md file with general and repository-specific agent instructions" + help_text: | + This will add an `AGENTS.md` file to the pipeline root directory. + + The file can be used to define repository-specific instructions for coding agents working in the pipeline. + nfcore_pipelines: True + custom_pipelines: True + default: false + citations: skippable_paths: - "assets/methods_description_template.yml" diff --git a/nf_core/pipelines/lint/files_unchanged.py b/nf_core/pipelines/lint/files_unchanged.py index 4f9fe3fcd2..5f896f3328 100644 --- a/nf_core/pipelines/lint/files_unchanged.py +++ b/nf_core/pipelines/lint/files_unchanged.py @@ -45,6 +45,7 @@ def files_unchanged(self) -> dict[str, list[str] | bool]: .gitignore .prettierignore + AGENTS.md .. tip:: You can configure the ``nf-core pipelines lint`` tests to ignore any of these checks by setting @@ -107,7 +108,7 @@ def files_unchanged(self) -> dict[str, list[str] | bool]: [Path("docs", "README.md")], ] files_partial = [ - [Path(".gitignore"), Path(".prettierignore")], + [Path(".gitignore"), Path(".prettierignore"), Path("AGENTS.md")], ] # Only show error messages from pipeline creation diff --git a/tests/pipelines/__snapshots__/test_create_app/test_customisation_help.svg b/tests/pipelines/__snapshots__/test_create_app/test_customisation_help.svg index 90da8d5715..1f874ef630 100644 --- a/tests/pipelines/__snapshots__/test_create_app/test_customisation_help.svg +++ b/tests/pipelines/__snapshots__/test_create_app/test_customisation_help.svg @@ -220,7 +220,7 @@ - + nf-core pipelines create — Create a new pipeline with the nf-core pipeline templa… @@ -237,8 +237,8 @@ ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Use a GitHub repository.Create a GitHub Show help  ▁▁▁▁▁▁▁▁repository for the▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ -pipeline. -▇▇ +pipeline.▂▂ + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Add Github badgesThe README.md file of Hide help  ▁▁▁▁▁▁▁▁the pipeline will▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ diff --git a/tests/pipelines/__snapshots__/test_create_app/test_type_custom.svg b/tests/pipelines/__snapshots__/test_create_app/test_type_custom.svg index bb027a6d32..a3c7d7c1e6 100644 --- a/tests/pipelines/__snapshots__/test_create_app/test_type_custom.svg +++ b/tests/pipelines/__snapshots__/test_create_app/test_type_custom.svg @@ -236,7 +236,7 @@ Use a GitHub repository.Create a GitHub Show help  ▁▁▁▁▁▁▁▁repository for the▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ pipeline. -▂▂ +▄▄ ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Add Github badgesThe README.md file of Show help  ▁▁▁▁▁▁▁▁the pipeline will▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ diff --git a/tests/pipelines/__snapshots__/test_create_app/test_type_nfcore.svg b/tests/pipelines/__snapshots__/test_create_app/test_type_nfcore.svg index 2c6d37cfd5..cab7c8c308 100644 --- a/tests/pipelines/__snapshots__/test_create_app/test_type_nfcore.svg +++ b/tests/pipelines/__snapshots__/test_create_app/test_type_nfcore.svg @@ -43,14 +43,15 @@ .terminal-r9 { fill: #808080 } .terminal-r10 { fill: #ddedf9;font-weight: bold } .terminal-r11 { fill: #004295 } -.terminal-r12 { fill: #2d2d2d } -.terminal-r13 { fill: #7ae998 } -.terminal-r14 { fill: #e0e0e0;font-weight: bold } -.terminal-r15 { fill: #0a180e;font-weight: bold } -.terminal-r16 { fill: #0d0d0d } -.terminal-r17 { fill: #008139 } -.terminal-r18 { fill: #ffa62b;font-weight: bold } -.terminal-r19 { fill: #495259 } +.terminal-r12 { fill: #000000 } +.terminal-r13 { fill: #2d2d2d } +.terminal-r14 { fill: #7ae998 } +.terminal-r15 { fill: #e0e0e0;font-weight: bold } +.terminal-r16 { fill: #0a180e;font-weight: bold } +.terminal-r17 { fill: #0d0d0d } +.terminal-r18 { fill: #008139 } +.terminal-r19 { fill: #ffa62b;font-weight: bold } +.terminal-r20 { fill: #495259 } @@ -214,7 +215,7 @@ - + nf-core pipelines create — Create a new pipeline with the nf-core pipeline templa… @@ -223,49 +224,49 @@ Components & Modules -▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ -Use reference genomesThe pipeline will be Show help  -▁▁▁▁▁▁▁▁configured to use a copy▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ -of the most common -reference genome files -from iGenomes +▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +Use reference genomesThe pipeline will be Show help  +▁▁▁▁▁▁▁▁configured to use a copy▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ +of the most common +reference genome files +from iGenomes -▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ -Use multiqcThe pipeline will include Show help  -▁▁▁▁▁▁▁▁the MultiQC module which▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ -generates an HTML report -for quality control. - -▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ -Use fastqcThe pipeline will include Show help  -▁▁▁▁▁▁▁▁the FastQC module which▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ -performs quality control -analysis of input FASTQ -files. - -▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ -Use nf-schemaUse the nf-schema Show help  -▁▁▁▁▁▁▁▁Nextflow plugin for this▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ -pipeline. - -Configurations - -▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ -Use GPUAdd GPU support to the Show help  -▁▁▁▁▁▁▁▁pipeline▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ - +▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +Use multiqcThe pipeline will Show help  +▁▁▁▁▁▁▁▁include the MultiQC▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ +module which generates +an HTML report for +quality control. + +▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +Use fastqcThe pipeline will Show help  +▁▁▁▁▁▁▁▁include the FastQC▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ +module which performs +quality control analysis +of input FASTQ files. + +▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +Use nf-schemaUse the nf-schema Show help  +▁▁▁▁▁▁▁▁Nextflow plugin for this▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ +pipeline. + +Configurations + +▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +Use GPUAdd GPU support to the Show help  +▁▁▁▁▁▁▁▁pipeline▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ - +Documentation & metadata - - - - -▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ - Back  Continue  -▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ +▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +Add AGENTS.mdInclude an AGENTS.md Show help  +▁▁▁▁▁▁▁▁file with general and▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▇▇ +repository-specific +▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + Back  Continue  +▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ - d Toggle dark mode  q Quit  a Toggle all ^p palette + d Toggle dark mode  q Quit  a Toggle all ^p palette diff --git a/tests/pipelines/test_create.py b/tests/pipelines/test_create.py index ccd125d17e..543f4e4527 100644 --- a/tests/pipelines/test_create.py +++ b/tests/pipelines/test_create.py @@ -60,6 +60,7 @@ def test_pipeline_creation_initiation(self, tmp_path): assert Path(pipeline.outdir, ".git").is_dir() assert f" {self.default_branch}\n" in git.Repo.init(pipeline.outdir).git.branch() assert not Path(pipeline.outdir, "pipeline_template.yml").exists() + assert Path(pipeline.outdir, "AGENTS.md").exists() with open(Path(pipeline.outdir, ".nf-core.yml")) as fh: assert "template" in fh.read() @@ -136,6 +137,7 @@ def test_pipeline_creation_with_yml_skip(self, tmp_path): assert not (pipeline.outdir / "CODE_OF_CONDUCT.md").exists() assert not (pipeline.outdir / ".github").exists() assert not (pipeline.outdir / "conf" / "igenomes.config").exists() + assert not (pipeline.outdir / "AGENTS.md").exists() def test_template_customisation_all_files_grouping(self): """Test that all pipeline template files are included in a pipeline customisation group."""