Skip to content

Exclude requirements from variant

Exclude core requirements for a variant; written into the variant file only.

Command variant.exclude. Writes files in the working tree, never to Git. It is refused while the workspace is read-only. Writes a variant file, and no change can be checked against a missing or faulty metamodel.

Field Type Required Description
variant elementRef yes The variant. An element whose type has no meaning variant is input.invalid with details.reason: "not-a-variant"; an unknown or ambiguous reference is ref.unknown or ref.ambiguous.
refs array of elementRef yes The core requirements to exclude, or with undo whose exclusion to remove. Adding an exclusion of a requirement with a validity, a need or a package is refused (SR-042 AK4): input.invalid with details.reason: "not-core" and details.refs (the refused refs); nothing is written. With undo every exclusion entry that is there is removed, also one of no core requirement (SR-042 AK7).
undo boolean no Remove the exclusions of refs instead. An exclusion that is not there is an info problem relation.not-found in problems, as relation.remove gives it; the other refs are undone. Default: false.
Field Type Required Description
files array of string yes
problems array of problem no

In the command prompt (Ctrl+Shift+P, macOS ⌘⇧P): the command Exclude requirements from variant.

reqseq variant exclude, with --json for the output as JSON. Its help:

Usage: reqseq variant exclude <variant> [options]
Exclude core requirements for a variant; written into the variant file only.
Arguments:
variant The variant. An element whose type has no meaning
`variant` is `input.invalid` with `details.reason:
"not-a-variant"`; an unknown or ambiguous reference is
`ref.unknown` or `ref.ambiguous`.
Options:
--variant <value> instead of the argument <variant>
--refs <value> The core requirements to exclude, or with `undo` whose
exclusion to remove. Adding an exclusion of a
requirement with a validity, a need or a package is
refused (SR-042 AK4): `input.invalid` with
`details.reason: "not-core"` and `details.refs` (the
refused refs); nothing is written. With `undo` every
exclusion entry that is there is removed, also one of
no core requirement (SR-042 AK7). repeatable
--undo Remove the exclusions of `refs` instead. An exclusion
that is not there is an `info` problem
`relation.not-found` in `problems`, as relation.remove
gives it; the other refs are undone. default: false
--no-undo set undo to false
--input <json|@file|-> command input as JSON: inline, from a file, or from
standard input
--workspace <path> workspace root (default: nearest folder upwards with
reqseq-workspace.yaml)
--json print exactly the command output as JSON
--yaml print the whole command output as YAML, problems one
per line
-h, --help show help

POST /v1/commands/variant.exclude on the local API (reqseq serve api), with the input as the JSON body; the answer is the output.

Tool variant_exclude of the MCP server (reqseq mcp), with the input as its arguments.