Data Handling Plan Generator
The data handling plan defines what evidence the agent collects, where it lives, how long it's kept, and who can read it. Replaces the deprecated free-form RoE.data_handling string with structured per-class fields.
When to Use
- After the system-provided RoE is available (its constraints and scope drive which data classes appear)
- User says "create data handling", "retention policy", "evidence storage", "PII handling", "compliance"
Workflow
Step 1: Start From the Schema Defaults
The DataHandlingPlan schema seeds four default classes — credentials, pii, source-code, business-data — with conservative retention. Keep these by default; override only when the engagement requires stricter or looser rules.
Step 2: Add Engagement-Specific Classes
Based on the interview:
| Engagement type |
Likely additional classes |
| Healthcare client |
health-records (classification: secret, retention: 7 days, framework: HIPAA) |
| Financial client |
cardholder-data (classification: secret, retention: 0 days — never store, framework: PCI-DSS) |
| EU client / data subjects |
Mark existing pii with framework: GDPR; consider personal-data-eu for stricter handling |
| Defense / classified |
controlled-unclassified (classification: secret, retention: 0 days off-network) |
Step 3: Set Evidence Storage Path
Default "/workspace/<engagement>/evidence/" works for sandbox-isolated engagements. Override only when:
- Engagement requires an external-bucket destination (S3 / Azure Blob with client KMS)
- Multiple engagement workspaces share an evidence repository
Step 4: Compliance Frameworks
Set compliance_frameworks from the interview. Common entries: GDPR, HIPAA, PCI-DSS, SOC2, NIST 800-53, FedRAMP, ISO 27001.
The orchestrator (Decepticon) reads this list and refuses to start objectives that violate the matching framework's evidence-handling rules.
Step 5: Purge Hard Cap
purge_after_days is the GLOBAL upper bound — every artifact older than this is deleted regardless of per-class retention. Default 90 days; reduce for engagements with tighter regulatory exposure.
Validation Checklist
Before writing plan/data-handling.json:
Anti-patterns
- Setting
retention_days=0 for credentials without explicit operator approval — agent then can't reference creds across phases
- Disabling
encryption_at_rest for any restricted+ class — straight compliance violation
- Listing HIPAA in
compliance_frameworks without a health-records class — orchestrator will refuse objectives that touch PHI
Output
Write to plan/data-handling.json validating against decepticon.core.schemas.DataHandlingPlan.
Document schema (derived from the validator's model)
plan/data-handling.json must validate against DataHandlingPlan. Fields not listed here are not part of the model and are ignored by the validator.
| field |
type |
required |
allowed values / nested keys |
engagement_name |
str |
yes |
|
data_classes |
list[DataClass] |
no |
each object: name, classification, retention_days, encryption_at_rest, encryption_in_transit, handling_notes |
evidence_storage_path |
str |
no |
|
chain_of_custody |
bool |
no |
|
purge_after_days |
int |
no |
>= 0 |
compliance_frameworks |
list[str] |
no |
|
version |
str |
no |
|
last_updated |
str |
no |
|
DataClass object:
| field |
type |
required |
allowed values |
name |
str |
yes |
|
classification |
str |
yes |
|
retention_days |
int |
yes |
>= 0 |
encryption_at_rest |
bool |
no |
|
encryption_in_transit |
bool |
no |
|
handling_notes |
str |
no |
|
1---2name: data-handling-template3description: "Data handling plan generator — evidence retention, encryption, chain-of-custody, compliance frameworks (GDPR / HIPAA / PCI-DSS / SOC2)."4allowed-tools: Read Write Edit5metadata:6 source: https://skillmd.com/skills/purpleailab/data-handling-template7 skillogy:8 version: 19 subdomain: planning10 when_to_use: "create data handling plan, evidence retention, chain-of-custody, GDPR, HIPAA, PCI-DSS, compliance, PII handling"11 tags: data-handling, evidence, retention, encryption, chain-of-custody, compliance, gdpr, hipaa12 upstream_ref: "Soundwave data-handling template — evidence retention, encryption, chain-of-custody, compliance"13---1415# Data Handling Plan Generator1617The data handling plan defines **what evidence the agent collects, where it lives, how long it's kept, and who can read it**. Replaces the deprecated free-form `RoE.data_handling` string with structured per-class fields.1819## When to Use2021- After the system-provided RoE is available (its constraints and scope drive which data classes appear)22- User says "create data handling", "retention policy", "evidence storage", "PII handling", "compliance"2324## Workflow2526### Step 1: Start From the Schema Defaults2728The `DataHandlingPlan` schema seeds four default classes — credentials, pii, source-code, business-data — with conservative retention. **Keep these by default**; override only when the engagement requires stricter or looser rules.2930### Step 2: Add Engagement-Specific Classes3132Based on the interview:3334| Engagement type | Likely additional classes |35|---|---|36| Healthcare client | `health-records` (classification: secret, retention: 7 days, framework: HIPAA) |37| Financial client | `cardholder-data` (classification: secret, retention: 0 days — never store, framework: PCI-DSS) |38| EU client / data subjects | Mark existing `pii` with framework: GDPR; consider `personal-data-eu` for stricter handling |39| Defense / classified | `controlled-unclassified` (classification: secret, retention: 0 days off-network) |4041### Step 3: Set Evidence Storage Path4243Default `"/workspace/<engagement>/evidence/"` works for sandbox-isolated engagements. Override only when:44- Engagement requires an external-bucket destination (S3 / Azure Blob with client KMS)45- Multiple engagement workspaces share an evidence repository4647### Step 4: Compliance Frameworks4849Set `compliance_frameworks` from the interview. Common entries: GDPR, HIPAA, PCI-DSS, SOC2, NIST 800-53, FedRAMP, ISO 27001.5051The orchestrator (Decepticon) reads this list and refuses to start objectives that violate the matching framework's evidence-handling rules.5253### Step 5: Purge Hard Cap5455`purge_after_days` is the GLOBAL upper bound — every artifact older than this is deleted regardless of per-class retention. Default 90 days; reduce for engagements with tighter regulatory exposure.5657## Validation Checklist5859Before writing `plan/data-handling.json`:6061- [ ] At least one `data_class` is `credentials`-equivalent62- [ ] Every class has `retention_days >= 0`63- [ ] `purge_after_days >= max(class.retention_days)` (otherwise classes get cut short)64- [ ] If `compliance_frameworks` includes HIPAA / GDPR / PCI-DSS, matching data classes exist65- [ ] `chain_of_custody=True` for any engagement that may produce findings6667## Anti-patterns6869- Setting `retention_days=0` for `credentials` without explicit operator approval — agent then can't reference creds across phases70- Disabling `encryption_at_rest` for any restricted+ class — straight compliance violation71- Listing HIPAA in `compliance_frameworks` without a `health-records` class — orchestrator will refuse objectives that touch PHI7273## Output7475Write to `plan/data-handling.json` validating against `decepticon.core.schemas.DataHandlingPlan`.7677## Document schema (derived from the validator's model)7879`plan/data-handling.json` must validate against `DataHandlingPlan`. Fields not listed here are not part of the model and are ignored by the validator.8081| field | type | required | allowed values / nested keys |82| --- | --- | --- | --- |83| `engagement_name` | str | yes | |84| `data_classes` | list[DataClass] | no | each object: `name`, `classification`, `retention_days`, `encryption_at_rest`, `encryption_in_transit`, `handling_notes` |85| `evidence_storage_path` | str | no | |86| `chain_of_custody` | bool | no | |87| `purge_after_days` | int | no | >= 0 |88| `compliance_frameworks` | list[str] | no | |89| `version` | str | no | |90| `last_updated` | str | no | |9192`DataClass` object:9394| field | type | required | allowed values |95| --- | --- | --- | --- |96| `name` | str | yes | |97| `classification` | str | yes | |98| `retention_days` | int | yes | >= 0 |99| `encryption_at_rest` | bool | no | |100| `encryption_in_transit` | bool | no | |101| `handling_notes` | str | no | |