check-release
Verifies that a TorchJD release was published correctly by checking the docs site, installing from PyPI, and smoke-testing newly…
Implements a new method (scalarizer or aggregator) in TorchJD, starting from the research produced by the research-method skill and following the established file-by-file conventions. Use when a contributor wants to add the actual implementation of a scalarizer or aggregator
$ npx -y skills add simplexlab/torchjd --skill implement-method --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/implement-methodContext preview
The summary Claude sees to decide when to auto-load this skill.
Implements a new method (scalarizer or aggregator) in TorchJD, starting from the research produced by the research-method skill and following the established file-by-file conventions. Use when a contributor wants to add the actual implementation of a scalarizer or aggregator
name: implement-method description: Implements a new method (scalarizer or aggregator) in TorchJD, starting from the research produced by the research-method skill and following the established file-by-file conventions. Use when a contributor wants to add the actual implementation of a scalarizer or aggregator that has already been investigated and listed in the tracking issues.
This skill implements a new method by recovering its research, comparing the paper against the existing implementations, settling the non-standard parts of its interface, and producing the full set of TorchJD files (class, docs, tests, changelog) that match the established conventions.
It is the companion of the `research-method` skill: that one investigates a method and records a row in a tracking issue; this one turns that row into a merged implementation.
**For agents:** invoke as `/implement-method method-name (paper-name)` (e.g. `/implement-method stch (Smooth Tchebycheff Scalarization for Multi-objective Optimization)`). If no method name is provided, ask the user for the name of the method and the title of the paper.
**For humans:** follow the numbered steps below to guide your development.
---
Determine whether the method should be a **scalarizer** or an **aggregator**, then read everything the `research-method` skill already found about it:
https://github.com/SimplexLab/TorchJD/issues/665. Fetch the relevant issue and find the row for this method. Read every column:
third-party ones (LibMTL, libmoon, pymoo, ...), ideally with the exact file(s) and line(s).
`research-method`). Read it if present.
statefulness, trainable parameters, randomness, warm-up / history buffers, statistics beyond the `forward` values (e.g. per-task losses for an aggregator), and preconditions. If these are not fully captured in the issue, **ask the user to share the `research-method` findings** before continuing. Do not guess them.
If the method is not in the tracking issue yet, run `research-method` first.
Read only the reference matching the method type, to keep context focused:
Each reference lists the exact files to create/edit and the TorchJD-specific conventions, with the closest existing methods to mirror.
Always do this — it is the step we invariably end up needing. Read the relevant equations / the algorithm box in the paper, then read the official and best-known third-party implementations at the exact files/lines from the tracking row.
Reconcile any discrepancies between them. The ones that most often bite:
for maximization, with the minimization form buried in a footnote. Find it, and check the sign of every reference / ideal-point subtraction.
the paper, or vice versa.
method's preconditions (e.g. non-negative weights); drop it only with a justification.
Decide which to follow, note **why**, and surface the disagreement to the user — the implementation should be faithful to a clearly-stated source, not an unexplained blend.
Using the research findings (Step 1) and the comparison (Step 3), map each non-standard aspect onto the closest existing pattern from the reference loaded in Step 2 (statefulness, trainable parameters, an internal optimizer, a preference/reference vector, ...). Then settle, for any method type:
how `nan`/`inf` should propagate.
List the non-standard parts and your proposed handling, and **confirm the design with the user before writing code.** This is where most of the maintainer review happens, so settle it up front.
Follow the file-by-file checklist in the reference loaded at Step 2. Match the style, naming, and conventions of the closest existing method. If you adapt code from a third-party repository, add the license header to the source file and an entry to `NOTICES` (see the reference).
Run the checks listed in the reference (unit tests with `-W error`, lint, and the docs build/doctest). GPU tests require a CUDA device; if you cannot run them, provide the exact commands for the user to run on their GPU and report back the results.
Before opening anything, re-read your own diff against the requirements and improve what can be improved. Check that:
base class(es), `forward(self, values, /)` returning a 0-d
Library for Jacobian descent with PyTorch. It enables the optimization of neural networks with multiple losses (e.g. multi-task learning).
Verifies that a TorchJD release was published correctly by checking the docs site, installing from PyPI, and smoke-testing newly…
Prepares a torchjd package release by verifying the changelog, README, bumping the version in pyproject.toml, and opening a…
Researches about a new method (scalarizer or aggregator) from the scientific literature and how to integrate it to TorchJD. Use…