Skip to content

[feat] Add AI agent skills for writing tests and creating configurations - #3761

Open
gppezzi wants to merge 1 commit into
reframe-hpc:developfrom
gppezzi:issue-3717-agent-skills
Open

gppezzi wants to merge 1 commit into
reframe-hpc:developfrom
gppezzi:issue-3717-agent-skills

Conversation

@gppezzi

@gppezzi gppezzi commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Adds two generic, site-agnostic AI agent skills under skills/, addressing #3717. They make AI agents (and new contributors) more effective at the two most common onboarding tasks: writing regression tests and configuring ReFrame on a new system.

What

  • skills/reframe-test/SKILL.md — for creating or fixing regression tests: test anatomy (class flavors, required attributes, build systems), sanity and performance functions and deferred expressions, variables, parameters, fixtures and dependencies, pipeline hooks, the validation loop (-l → --dry-run → -r), failure diagnosis from failure reports and stage directories, and common pitfalls.
  • skills/reframe-config/SKILL.md — for creating configurations and onboarding: how the configuration is discovered (-C, autodetection), a minimal viable configuration, progressive configuration knobs (system → partition → schedulers/launchers → custom resources → scheduler options → environments → logging → general), each with defaults and when-to-set guidance, a bring-up workflow for new systems, and common pitfalls.

Design

  • Generic: no reference to any specific site, system or scheduler.
  • Grounded in the official documentation and the in-repository examples (docs/tutorial.rst, examples/tutorial/, hpctestlib/), which the skills link to instead of duplicating.
  • Content verified against the framework sources (API names, CLI syntax, configuration defaults) before inclusion.

Validation

Validated behaviorally: two fresh agents, each equipped only with the corresponding skill document and no other ReFrame knowledge, performed the following tasks end to end:

  1. With the test skill: write a run-only hostname test and validate it with the skill's full loop — list, dry-run and real run all passed.
  2. With the config skill: create a two-partition Slurm cluster configuration (login partition + compute partition with a custom scheduler resource) and schema-validate it.

The prompt used for testing (adapt paths to your checkout and pick any scratch directory):

I want you to do two tasks on this machine. Before starting, read these two skill documents and follow them as your only ReFrame knowledge:

  skills/reframe-test/SKILL.md
  skills/reframe-config/SKILL.md

The reframe binary is at:
  .venv/bin/reframe

Work only inside this scratch directory (create it if needed):
  ./skill-e2e-test/

TASK 1 — Create a configuration for the CURRENT cluster:
  - Discover the facts you need about this machine first (hostname, scheduler, partitions, account rules) — the config skill's "bring-up workflow" section tells you what to gather.
  - Write the configuration to ./skill-e2e-test/settings.py
  - Validate it following the skill's validation workflow.

TASK 2 — Create a hello-world test (hostname check):
  - Write a run-only test that runs `hostname` and validates that a hostname was printed, to ./skill-e2e-test/hostname_test.py
  - Validate it with the test skill's full validation loop: list, dry-run, and a real run using the config from Task 1.

Constraints:
- Do NOT modify anything else in the ReFrame checkout.
- Write only the two files (plus reframe's own stage/output artifacts) in the scratch directory.
- Report at the end: the files you wrote, the exact commands you ran, and their pass/fail outcome.

Fixes #3717.

Add two generic, site-agnostic AI agent skills under skills/:

- reframe-test: anatomy of regression tests, sanity and performance
  functions, variables, parameters, fixtures and dependencies,
  pipeline hooks, the test validation loop and failure diagnosis.
- reframe-config: configuration discovery, a minimal viable
  configuration, progressive configuration knobs with defaults, a
  bring-up workflow for new systems, and common pitfalls.

Both skills are grounded in the official documentation and the
in-repository examples, and their content was verified against the
framework sources. Fixes reframe-hpc#3717.

Signed-off-by: Guilherme Peretti-Pezzi <peretti@cscs.ch>
@gppezzi gppezzi self-assigned this Dec 2, 2026
@codecov

codecov Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.05%. Comparing base (37030d6) to head (59aae23).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3761   +/-   ##
========================================
  Coverage    92.05%   92.05%           
========================================
  Files           72       72           
  Lines        14718    14718           
========================================
  Hits         13549    13549           
  Misses        1169     1169           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gppezzi
gppezzi marked this pull request as ready for review December 3, 2026 14:33

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add AI agent skills for creating cluster configurations and writing tests

1 participant