Create relation
Add a relation; stores target UUID and current version, plus the title only within the same repository.
Command relation.add. Writes files in the working tree, never to Git. It is refused while the workspace is read-only. Writes the current version of the target, which depends on the metamodel (which properties count).
| Field | Type | Required | Description |
|---|---|---|---|
source |
elementRef |
yes | UUID, short ID or identifier (e.g. SR-036), any case; several matches give ref.ambiguous. |
kind |
key |
yes | Fixed metamodel key of a type, property, relation kind or status value. Readable English, lower case, dashes (D-043, SR-010 AK2). |
target |
elementRef |
yes | UUID, short ID or identifier (e.g. SR-036), any case; several matches give ref.ambiguous. |
Output
Section titled “Output”| 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 Create relation. Key: Ctrl+K R (macOS ⌘K R).
reqseq relation add, with --json for the output as JSON. Its help:
Usage: reqseq relation add <source> <kind> <target> [options]
Add a relation; stores target UUID and current version, plus the title onlywithin the same repository.
Options: --source <value> instead of the argument <source> --kind <value> instead of the argument <kind> --target <value> instead of the argument <target> --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/relation.add on the local API (reqseq serve api), with the input as the JSON body; the answer is the output.
Tool relation_add of the MCP server (reqseq mcp), with the input as its arguments.