Phase 9 output generation

From awslabs/threat-modeling-mcp-server · View interactive version

Phase 9 output generation is an AI agent skill from the GitHub repository awslabs/threat-modeling-mcp-server. Phase 9 Output Generation guide with Threat Composer export reference. Use when generating final reports, exporting to JSON/Markdown, or completing the threat modeling process.

How to use this skill

Skill file

Phase 9: Output Generation and Documentation

Objective

Generate final deliverables: Threat Composer-compatible JSON export and human-readable Markdown report. All files are saved to the .threatmodel/ directory.

Tools Reference

export_threat_model

Exports the current model and includes a state summary in the response.

manage_workflow(action="set_project", directory=...)

<base>.extended.json snapshot unless include_extended_data=False

file to import; it never carries extra top-level keys

Threat Composer) with internal ids, full text, residual-risk assessments,

profiles, and phase progress

The comprehensive export includes current threat and mitigation statuses.

Markdown and the extended snapshot also include residual-risk assessments.

Progress Tools

Output Files

JSON Export (Threat Composer Compatible)

.threatmodel/comprehensive_threat_model_YYYYMMDD_HHMMSS.tc.json

Schema (version 1):

{
  "schema": 1,
  "applicationInfo": { "name": "", "description": "" },
  "architecture": { "description": "" },
  "dataflow": { "description": "" },
  "assumptions": [...],
  "mitigations": [...],
  "assumptionLinks": [],
  "mitigationLinks": [...],
  "threats": [...]
}

Ids in .tc.json are deterministic UUIDs derived from the internal ids, and

every mitigationLinks entry references exported entities.

Threat Composer Field Constraints

The stored model keeps full text. These limits apply only to the .tc.json

copy; each shortened field is listed under "Export Warnings" in the tool

response.

| Field | Max Length |

|---|---|

| threatSource | 200 chars |

| prerequisites | 200 chars |

| threatAction | 200 chars |

| threatImpact | 200 chars |

| statement | 1400 chars |

| tags (each) | 30 chars |

| mitigation / assumption content | 1000 chars |

Threat Composer Status Values

| Threats | Mitigations |

|---|---|

| threatIdentified | mitigationIdentified |

| threatResolved | mitigationInProgress |

| threatResolvedNotUseful | mitigationResolved |

| | mitigationResolvedWillNotAction |

Markdown Export (Human-Readable)

.threatmodel/comprehensive_threat_model_YYYYMMDD_HHMMSS.md

Contains:

Importing to AWS Threat Composer

  1. Open AWS Threat Composer
  2. Click Import
  3. Select the .tc.json file from .threatmodel/ (never the .extended.json snapshot)
  4. All threats, mitigations, assumptions, and links will load

Workflow

  1. Call manage_workflow(action="guidance", phase="9")
  2. Call export_threat_model(), optionally with output_path="my_model.json"
  3. Call manage_workflow(action="progress") for final summary
  4. Present to user:

Completion Criteria

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.