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

# API Reference — Implementing Role Based Security Training

## Agent Script

### Commands

| Command | Description |
|---|---|
| `node agent.js segment --hr-feed employees.csv` | Segment employees by role and risk profile |
| `node agent.js learning-path --role developer` | Generate learning path for a specific role |
| `node agent.js assess --role executive --type competency` | Run competency assessment for role |
| `node agent.js compliance-track --standard hipaa --department finance` | Track compliance by department |

### Examples

```bash
# Primary workflow
node agent.js segment --hr-feed employees.csv

# Secondary analysis
node agent.js learning-path --role developer

# Generate deliverable
node agent.js assess --role executive --type competency

# Measure and report
node agent.js compliance-track --standard hipaa --department finance
```

## External Tools

| Tool | Command | Purpose |
|---|---|---|
| LMS API | `curl -X GET https://lms/api/v1/enrollments` | Learning management system |
| HR Feed | `python3 -c 'import csv; ...'` | Employee role data import |
| SCORM Cloud | `scorm-cloud --assign --role developer` | Content assignment |

## Role-Based Training Matrix

| Role | Core Topics | Advanced Topics | Cadence |
|---|---|---|---|
| All employees | Phishing, passwords, reporting | Physical security | Annual |
| Developers | OWASP Top 10, secure coding | Supply chain, secrets | Semi-annual |
| Executives | BEC, whale phishing | Board reporting, risk | Quarterly |
| IT/Admins | Privilege escalation, IR | Cloud security | Semi-annual |
| HR | Social engineering, data handling | Privacy regulations | Quarterly |
| Finance | Wire fraud, invoice scams | Vendor verification | Quarterly |
