# daniellegons-afk/it-incident-simulator architecture

> Architecture diagram of the GitHub repository daniellegons-afk/it-incident-simulator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/daniellegons-afk/it-incident-simulator
- Repository: https://github.com/daniellegons-afk/it-incident-simulator

## Overview

This is a small command-line IT incident-response simulator. A trainee responds to a randomly selected incident scenario; the program replies through an AWS Bedrock-backed engineer persona, falling back to scripted responses if the model call fails, then scores checkpoint coverage and order. The excerpts show the main workflow, but also contain apparent runtime issues in the model request and response handling; the graph describes the intended calls visible in code, not guaranteed successful execution.

Main entry points: [`sim.js`](https://github.com/daniellegons-afk/it-incident-simulator/blob/main/sim.js) (CLI Simulator), [`bedrock.mjs`](https://github.com/daniellegons-afk/it-incident-simulator/blob/main/bedrock.mjs) (Bedrock Client), [`persona.mjs`](https://github.com/daniellegons-afk/it-incident-simulator/blob/main/persona.mjs) (Engineer Persona), [`scenarios.mjs`](https://github.com/daniellegons-afk/it-incident-simulator/blob/main/scenarios.mjs) (Incident Scenarios)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Conversation"]
  node_simulator["CLI Simulator<br/>[sim.js]"]
  node_persona["Engineer Persona<br/>[persona.mjs]"]
  node_bedrock["Bedrock Client<br/>[bedrock.mjs]"]
end

subgraph group_content["Scenario Content"]
  node_scenarios["Incident Scenarios<br/>[scenarios.mjs]"]
end

subgraph group_assessment["Assessment"]
  node_grader["Checkpoint Grader<br/>[grader.mjs]"]
end

node_trainee(("Trainee"))
node_aws["AWS Bedrock"]

node_trainee -->|"submits responses"| node_simulator
node_simulator -->|"selects scenario"| node_scenarios
node_simulator -->|"builds prompt"| node_persona
node_simulator -->|"requests reply"| node_bedrock
node_bedrock -->|"sends request"| node_aws
node_bedrock -->|"returns reply"| node_simulator
node_simulator -->|"checks checkpoints"| node_grader
node_simulator -->|"prints replies and score"| node_trainee

click node_simulator "https://github.com/daniellegons-afk/it-incident-simulator/blob/main/sim.js"
click node_persona "https://github.com/daniellegons-afk/it-incident-simulator/blob/main/persona.mjs"
click node_bedrock "https://github.com/daniellegons-afk/it-incident-simulator/blob/main/bedrock.mjs"
click node_scenarios "https://github.com/daniellegons-afk/it-incident-simulator/blob/main/scenarios.mjs"
click node_grader "https://github.com/daniellegons-afk/it-incident-simulator/blob/main/grader.mjs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_simulator,node_persona,node_bedrock toneBlue
class node_scenarios toneAmber
class node_grader toneMint
class node_trainee,node_aws toneIndigo
```

## Components

### Conversation

- [CLI Simulator](https://github.com/daniellegons-afk/it-incident-simulator/blob/main/sim.js): `sim.js`
- [Engineer Persona](https://github.com/daniellegons-afk/it-incident-simulator/blob/main/persona.mjs): `persona.mjs`
- [Bedrock Client](https://github.com/daniellegons-afk/it-incident-simulator/blob/main/bedrock.mjs): `bedrock.mjs`

### Scenario Content

- [Incident Scenarios](https://github.com/daniellegons-afk/it-incident-simulator/blob/main/scenarios.mjs): `scenarios.mjs`

### Assessment

- [Checkpoint Grader](https://github.com/daniellegons-afk/it-incident-simulator/blob/main/grader.mjs): `grader.mjs`

### Other components

- **Trainee**
- **AWS Bedrock**

## Connections

- Trainee → CLI Simulator: submits responses (evidence: `sim.js`)
- CLI Simulator → Incident Scenarios: selects scenario (evidence: `sim.js`)
- CLI Simulator → Engineer Persona: builds prompt (evidence: `sim.js`)
- CLI Simulator → Bedrock Client: requests reply (evidence: `sim.js`)
- Bedrock Client → AWS Bedrock: sends request (evidence: `bedrock.mjs`)
- Bedrock Client → CLI Simulator: returns reply (evidence: `sim.js`)
- CLI Simulator → Checkpoint Grader: checks checkpoints (evidence: `sim.js`)
- CLI Simulator → Trainee: prints replies and score (evidence: `sim.js`)
