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

## Threshold Assessment

```bash
node scripts/agent.js --action threshold --processing "automated credit scoring"
```

## Full Risk Assessment

```bash
node scripts/agent.js --action assess --processing "employee health monitoring" \
  --data-subjects "employees" --data-types "health,biometric"
```

## Generate DPIA Report

```bash
node scripts/agent.js --action report --assessment /tmp/assessment.json
```

## DPIA Trigger Criteria

| Trigger | Article | Mandatory |
|---------|---------|-----------|
| Systematic profiling | Art. 35(3)(a) | Yes |
| Large-scale special categories | Art. 35(3)(b) | Yes |
| Public area monitoring | Art. 35(3)(c) | Yes |
| New technologies | Art. 35(1) | Risk-based |
| Cross-border transfers | Art. 44-49 | Risk-based |
| Vulnerable data subjects | EDPB Guidelines | Risk-based |

## Risk Scoring

| Score Range | Level | Action |
|-------------|-------|--------|
| 1-4 | Low | Optional mitigation |
| 5-8 | Medium | Recommended mitigation |
| 9-12 | High | Required mitigation |
| 13-16 | Critical | Supervisory consultation (Art. 36) |

## Output Format

```json
{
  "tool": "pia-assessor",
  "action": "assess",
  "processing": "employee health monitoring",
  "risks": [...],
  "summary": {"total_risks": 8, "critical": 0, "high": 4}
}
```
