Skip to content

Add support for native IR input format - #64

Merged
melonattacker merged 2 commits into
mainfrom
feature/support-ir-input
Mar 10, 2026
Merged

melonattacker merged 2 commits into
mainfrom
feature/support-ir-input

Conversation

@melonattacker

Copy link
Copy Markdown
Owner

This pull request introduces support for native Graph IR JSON as an explicit input format for Threat Thinker, enabling users to bypass diagram parsing and directly provide a structured architecture model. The changes update CLI options, documentation, and internal input handling to integrate this new format alongside existing diagram types.

Native IR support and input handling:

  • Added a new --ir CLI flag and input format for native Graph IR JSON, allowing users to supply explicit architecture models without diagram syntax. Updates include parsing logic, CLI argument handling, and error messages for unsupported formats. (src/threat_thinker/main.py, src/threat_thinker/input_loader.py, [1] [2] [3] [4] [5]
  • Updated input detection and loading to centralize format dispatch, including native IR, and removed redundant parsing logic from main.py. (src/threat_thinker/main.py, src/threat_thinker/input_loader.py, [1] [2]

Documentation and example updates:

  • Added a comprehensive Native IR Guide explaining the JSON schema, usage scenarios, CLI/API/Web UI integration, validation rules, and example files. (docs/ir.md, docs/ir.mdR1-R239)
  • Updated CLI documentation and quick links to reflect the new --ir flag and native IR input, clarifying autodetection rules and supported formats. (docs/cli.md, docs/README.md, [1] [2] [3]
  • Expanded README and design docs to include native IR as a supported input format, and clarified processing flow diagrams. (README.md, docs/design.md, [1] [2] [3] [4]

Examples and API changes:

@melonattacker
melonattacker merged commit f009732 into main Mar 10, 2026
2 checks passed
@melonattacker
melonattacker deleted the feature/support-ir-input branch March 10, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant