Summary
Add a structkit graph command that shows dependency relationships between structure definitions.
Motivation
StructKit structures can compose other structures through folders[].struct. As templates grow, users need a way to understand dependencies, detect cycles, and document how structures are composed.
Proposed behavior
- Accept a structure name, local YAML file, or
--all.
- Traverse nested structure references from
folders[].struct.
- Detect and report missing references and cycles.
- Support output formats such as text tree, JSON, and Mermaid.
- Support custom structures through
--structures-path.
Example usage
structkit graph project/python
structkit graph terraform/apps/generic --format mermaid
structkit graph --all --format json
Acceptance criteria
- Command is registered in the CLI.
- Includes tests for single dependencies, multiple dependencies, nested dependencies, missing dependencies, and cycles.
- Mermaid output can be pasted into documentation.
- Documentation includes examples for text, JSON, and Mermaid output.
Summary
Add a
structkit graphcommand that shows dependency relationships between structure definitions.Motivation
StructKit structures can compose other structures through
folders[].struct. As templates grow, users need a way to understand dependencies, detect cycles, and document how structures are composed.Proposed behavior
--all.folders[].struct.--structures-path.Example usage
structkit graph project/pythonstructkit graph terraform/apps/generic --format mermaidstructkit graph --all --format jsonAcceptance criteria