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.
The graph command shall output the graph structure in JSON format.
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 ┆ ... │
└────────┴─────────────┘
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"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
...
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
The version command shall display the current version of the docgraph tool.
The help command shall display usage information for docgraph and its subcommands.
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"
}
]