<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# API Reference — Building Security Culture Metrics

## Agent Script

### Commands

| Command | Description |
|---|---|
| `node agent.js dashboard --sources lms,gophish,surveys` | Build security culture dashboard |
| `node agent.js trend --metric click-rate --period 12m` | Analyze metric trends over time |
| `node agent.js survey --template culture-assessment` | Generate security culture survey |
| `node agent.js report --format executive --quarter Q1-2026` | Generate executive metrics report |

### Examples

```bash
# Primary workflow
node agent.js dashboard --sources lms,gophish,surveys

# Secondary analysis
node agent.js trend --metric click-rate --period 12m

# Generate deliverable
node agent.js survey --template culture-assessment

# Measure and report
node agent.js report --format executive --quarter Q1-2026
```

## External Tools

| Tool | Command | Purpose |
|---|---|---|
| Grafana | `grafana-cli dashboard import` | Metrics visualization |
| Power BI | `powerbi --publish report.pbix` | Executive dashboards |
| matplotlib | `python3 -c 'import matplotlib'` | Python chart generation |

## Key Performance Indicators

| KPI | Target | Data Source | Frequency |
|---|---|---|---|
| Phishing click rate | < 5% | GoPhish/KnowBe4 | Monthly |
| Report rate | > 60% | Phishing platform | Monthly |
| Training completion | > 95% | LMS | Quarterly |
| Culture survey score | > 4.0/5.0 | Survey tool | Annual |
| Mean time to report | < 10 min | SOC tickets | Monthly |
| Repeat offender rate | < 3% | Phishing platform | Quarterly |
