Show variant difference
What a variant adds, replaces and excludes compared to the core.
Command variant.diff. Reads the workspace and changes no file.
| 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. |
Output
Section titled “Output”| Field | Type | Required | Description |
|---|---|---|---|
added |
array of uuid |
yes | Requirements whose validity names the variant and that replace no core requirement that is not excluded in it (SR-044 AK1), also the source of a replaces onto an element that is no core requirement (SR-041 AK8). Store order. |
replaced |
array of object |
yes | One row per pair, in store order of the core requirement, then of the replacement: two replacements of one core requirement are two rows (SR-041 AK7). A core requirement that is also excluded is not here (SR-042 AK5). |
replaced[].core |
uuid |
yes | Element ID: random UUID version 4, lower case, never changes (D-017, SR-002). |
replaced[].replacement |
uuid |
yes | Element ID: random UUID version 4, lower case, never changes (D-017, SR-002). |
excluded |
array of uuid |
yes | Core requirements the variant excludes, also when replaced too; store order. |
names |
array of elementName |
no | Every element the lists name, each once, in order first named (#588). Left out when it names none. |
problems |
array of problem |
no | The variant.target-not-core hints of the variant’s own entries and of its replacements. |
incomplete |
incomplete |
no | A repository is not here: a replacement or exclusion stored there is missing (SR-006 AK2). |
In the command prompt (Ctrl+Shift+P, macOS ⌘⇧P): the command Show variant difference.
reqseq variant diff, with --json for the output as JSON. Its help:
Usage: reqseq variant diff <variant> [options]
What a variant adds, replaces and excludes compared to the core.
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> --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 helpPOST /v1/commands/variant.diff on the local API (reqseq serve api), with the input as the JSON body; the answer is the output.
Tool variant_diff of the MCP server (reqseq mcp), with the input as its arguments.