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

## agent.js CLI

```bash
# Inventory systems and control posture
node scripts/agent.js --action inventory --systems systems.json

# Assess debt against baseline
node scripts/agent.js --action assess --systems systems.json --baseline nist_800_53

# Score and summarize debt items
node scripts/agent.js --action score --debts debt-items.json --output scored.json

# Generate remediation plan
node scripts/agent.js --action remediate --scored scored.json --output plan.json
```

## System Inventory JSON Schema

```json
{
  "name": "api-gateway",
  "type": "infrastructure",
  "criticality": "high",
  "months_since_review": 6,
  "controls": {
    "encryption_in_transit": true,
    "mfa_enabled": true,
    "audit_logging": true
  }
}
```

## Debt Scoring Formula

```
Score = Impact × Likelihood × (1 + Exposure Duration Factor)
Exposure Duration Factor = min(1.0, months_exposed / 12)
```

| Rating | Score Range | Deadline |
|--------|-------------|----------|
| Critical | 20-30 | 7 days |
| High | 12-19 | 30 days |
| Medium | 6-11 | 90 days |
| Low | 1-5 | 180 days |

## Supported Baselines

- `nist_800_53` — NIST SP 800-53 Rev 5
