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

# API Reference — Security Communication Strategy

## Agent Tools

| Tool | Description |
|---|---|
| Stakeholder Mapper | `map_stakeholders(groups)` — Define communication matrix |
| Message Drafter | `draft_message(audience, topic, severity)` — Tailored messaging |
| Crisis Planner | `plan_crisis_comms(type, severity)` — Incident comms timeline |

## CLI Usage

```bash
# Map stakeholders
node agent.js stakeholders --groups '[{"name": "board", "frequency": "quarterly"}]'

# Draft message
node agent.js draft --audience engineering --topic "Log4j Patch" --severity high

# Crisis comms
node agent.js crisis --type "data breach" --severity critical
```

## 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
