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

## agent.js CLI

```bash
# Catalog available security patterns
node scripts/agent.js --action catalog

# Map controls to compliance frameworks
node scripts/agent.js --action map --controls controls.json --frameworks nist_800_53,cis_v8

# Generate reference architecture from template
node scripts/agent.js --action generate --template three-tier --output ref-arch.json

# Validate framework coverage
node scripts/agent.js --action coverage --architecture ref-arch.json --framework nist_800_53
```

## Supported Templates

| Template | Layers | Use Case |
|----------|--------|----------|
| three-tier | presentation, application, data | Traditional web applications |
| microservices | ingress, service-mesh, data, observability | Cloud-native architectures |

## Control Mapping JSON Schema

```json
{
  "control": "encryption-at-rest",
  "mappings": {
    "nist_800_53": ["SC-28"],
    "cis_v8": ["3.11"],
    "iso_27001": ["A.8.24"]
  },
  "coverage": 3
}
```

## Supported Frameworks

- `nist_800_53` — NIST SP 800-53 Rev 5
- `cis_v8` — CIS Controls v8
- `iso_27001` — ISO/IEC 27001:2022
