Functional Requirements: CLI
February 15, 2026 · View on GitHub
Lint Command
The lint command shall parse all Markdown files in the target directory, build the graph, and report any violations of
validation rules via the Command Line Interface.
Derived from
Graph Command
The graph command shall output the graph structure in JSON format.
Derived from
List Capability
The list capability shall output nodes matching a specific query with their names. This is achieved using the query
command.
Usage:
docgraph query "MATCH (n) WHERE n.id =~ 'FR-*' RETURN n.id, n.name"
Output format:
┌────────┬─────────────┐
│ n.id ┆ n.name │
╞════════╪═════════════╡
│ FR-001 ┆ ... │
└────────┴─────────────┘
Derived from
Trace Capability
The trace capability shall find and display all paths between a start ID and target IDs matching a query. This is
achieved using the query command.
Usage:
docgraph query "MATCH p=(src)-[*]->(dst) WHERE src.id = 'A' AND dst.id = 'B' RETURN p"
Derived from
Describe Command
The describe command shall display the details and relationships of a specific Node.
Usage:
docgraph describe <id>
<id>: The ID of the Node to describe.
Output format:
ID: Name
ID references to
target_id: target_name
...
The following IDs are depends on ID
source_id: source_name
source_id: source_name
...
Derived from
Type Command
The type command shall display node type information from the configuration file.
Usage:
docgraph type # List all node types with descriptions
docgraph type <type-id> # Show type details and rules
- Without arguments: Lists all defined node types with their descriptions.
- With
<type-id>: Shows the type's description and reference rules.
Output format (list):
Node Types:
FR - Functional Requirement
NFR - Non-Functional Requirement
...
Output format (details):
Type: FR
Description: Functional Requirement
Rules:
from [UC, CON] min=1 max=-: Functional requirements are derived from business needs
to [MOD] min=1 max=-: Each functional requirement must be realized by at least one module
Derived from
Version Command
The version command shall display the current version of the docgraph tool.
Derived from
Help Command
The help command shall display usage information for docgraph and its subcommands.
Derived from
Query Command
The query command shall execute Cypher-like queries against the documentation graph to retrieve nodes and
relationships matching specific patterns.
Usage:
docgraph query "MATCH (n:UC) WHERE n.name CONTAINS 'Login' RETURN n.id" [--format <table|json>]
- Query string: A Cypher-like pattern matching string.
- Supports
MATCHclause with node and relationship patterns (e.g.,(n:Type),(a)-[r]->(b)). - Supports
WHEREclause with operators:=,<>,<,>,<=,>=,CONTAINS,AND,OR. - Supports
RETURNclause to select specific properties (n.id,n.file, etc.).
- Supports
--format: Output format.table(default): Tidy ASCII table.json: Structured JSON output.
Supported Properties:
Returning the node variable itself (e.g., RETURN n) extends to all available properties.
id: Node ID.name: Node name (Markdown heading).type/node_type: Node type identifier.file: Relative file path.line: Start line number.content: Raw Markdown content.
Output format (table):
┌────────┬─────────────┐
│ n.id ┆ n.name │
╞════════╪═════════════╡
│ UC_001 ┆ User Login │
└────────┴─────────────┘
Output format (json):
[
{
"n.id": "UC_001",
"n.name": "User Login"
}
]