<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
# Security Control Effectiveness Review — API Reference

## agent.js CLI

```bash
# Inventory controls
node scripts/agent.js --action inventory --controls controls.json

# Assess effectiveness with metrics
node scripts/agent.js --action assess --controls controls.json --metrics metrics.json

# Identify gaps
node scripts/agent.js --action gaps --assessment assessment.json --output gaps.json

# Generate review report
node scripts/agent.js --action report --assessment assessment.json --output report.json
```

## Control JSON Schema

```json
{
  "name": "edr",
  "category": "detection",
  "status": "implemented",
  "owner": "security-ops",
  "metrics": {
    "coverage_pct": 94.5,
    "detection_rate": 87.3,
    "false_positive_rate": 12.0,
    "mean_time_to_detect_hours": 0.5
  }
}
```

## Effectiveness Score Formula

```
Score = Coverage×0.3 + DetectionRate×0.3 + (100-FPRate)×0.2 + TimeScore×0.2
TimeScore = max(0, (24 - MTTD) / 24 × 100)
```

## Maturity Levels

| Level | Label | Score Range |
|-------|-------|-------------|
| 5 | Adaptive | 81-100 |
| 4 | Optimized | 61-80 |
| 3 | Managed | 41-60 |
| 2 | Defined | 21-40 |
| 1 | Ad-hoc | 1-20 |
| 0 | Non-existent | 0 |
