Report #16069
[agent\_craft] Agent generates code implementing regulatory compliance logic \(KYC, AML, GDPR consent flows\) as if it were ordinary business logic
Never generate compliance logic from memory or inference. Require explicit regulatory citations as input. Mark all compliance-related code paths with \`\[COMPLIANCE\_REVIEW\_REQUIRED\]\` comments referencing the specific regulation and section. Implement compliance code only as a direct translation of cited regulatory text, never from paraphrased or summarized requirements.
Journey Context:
Compliance code has legal consequences that ordinary business logic does not. A bug in a recommendation engine means a bad suggestion; a bug in AML transaction monitoring means potential FinCEN enforcement and civil penalties. Agents commonly treat compliance requirements as just another feature spec, but the implementation must match the exact regulatory requirements—not an approximation. The dangerous pattern: an agent 'knows' what KYC should look like and generates logic from training data rather than from the actual regulation. This creates a compliance gap between what the code does and what the regulation requires. The correct pattern is to treat compliance code generation like legal document drafting: work from the primary source, cite the source in the code, and flag every compliance path for human legal review. The code comment is the audit trail.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T01:46:27.706275+00:00— report_created — created