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

## agent.js CLI

```bash
# Baseline action
node scripts/agent.js --action baseline

# Watch action
node scripts/agent.js --action watch

# Incremental action
node scripts/agent.js --action incremental

# Diff action
node scripts/agent.js --action diff

# Update Baseline action
node scripts/agent.js --action update-baseline
```

## Baseline Schema

```json
{
  "model_path": "tm.py",
  "timestamp": "2026-03-18T07:00:00Z",
  "components": ["web-app", "api-server", "database"],
  "trust_boundaries": 4,
  "threats_identified": 23,
  "checksum": "a1b2c3d4e5f67890"
}
```

## Diff Output Schema

```json
{
  "baseline_threats": 23,
  "current_threats": 26,
  "new_threats": 3,
  "resolved_threats": 0,
  "components_added": ["Payment API"],
  "risk_delta": "increased"
}
```
