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

# API Reference — Security Capability Assessment

## Agent Tools

| Tool | Description |
|---|---|
| Capability Scorer | `score_capability(domain, scores)` — Rate maturity |
| Gap Analyzer | `gap_analysis(current, target)` — Identify gaps |
| Benchmarker | `benchmark(org, industry)` — Industry comparison |

## CLI Usage

```bash
# Score capability
node agent.js score --domain detection --scores '{"monitoring": 3}'

# Gap analysis
node agent.js gaps --current '{"detection": 2}' --target '{"detection": 4}'

# Benchmark
node agent.js benchmark --org '{"detection": 3.5}' --industry '{"detection": 3.0}'
```

## Output Format

All commands return JSON with the following structure:

```json
{
  "action": "<command_name>",
  "...": "command-specific fields"
}
```

## Error Handling

- Invalid input returns `{"error": "description"}` with non-zero exit code
- JSON parsing errors are caught and reported with context
- Missing required arguments trigger argparse help display
