Skip to content

feat(compliance): add the aml copilot and automated suspension ports - #282

Merged
tiana-code merged 1 commit into
mainfrom
feat/E-04-plugin-ports
Jun 19, 2026
Merged

feat(compliance): add the aml copilot and automated suspension ports#282
tiana-code merged 1 commit into
mainfrom
feat/E-04-plugin-ports

Conversation

@tiana-code

Copy link
Copy Markdown
Owner

E-04 Compliance #269 - two interface-only clean-room plug-in ports.

What

  • AmlCopilot (application/copilot): assist(CopilotRequest): CopilotResponse - an out-of-tree LLM assistant for AML case work. The contract is generative/non-deterministic and the response is advisory guidance for a human reviewer, never authoritative; the port encodes no business prompt. AmlCopilotException for technical failures.
  • AutomatedSuspensionPort (application/suspension): requestSuspension(SuspensionRequest): SuspensionResult (method name avoids the Kotlin suspend keyword) - suspends a subject on a caller-decided signal; the port encodes no rule for what the signal is (§5.1). Sealed result Suspended / AlreadySuspended (idempotent replay, first-class) / Rejected (business refusal); AutomatedSuspensionException for technical failures.
  • Opaque references (reuse KycSession.MAX_SUBJECT_REFERENCE_LENGTH), generic context/reason, no PII. Reflection contract tests for both ports + all result variants + request guards.

Clean-room (§5.2/§5.3)

No real LLM prompts/templates, AML rules/thresholds, provider names, or PII. Distinct from RuleSynthesizer (#174, decision-engine) - that synthesizes DSL; this assists a reviewer.

Gate chain

  • critic: GO-WITH-CHANGES (AlreadySuspended idempotency variant + Rejected KDoc; caseReference bound KDoc; public MAX_REASON_LENGTH - all applied).
  • security-auditor (opus): PASS - clean-room clean, advisory framing satisfied, generic suspension, 4/4 ACs.
  • code-reviewer: APPROVED (1 LOW applied: symbolic length const in the copilot test).
  • evaluator: PASS (0.93).
    All local gates green; interface-only (no impl/Spring/LLM), application/** so domain jacoco gate unaffected.

Closes #269

Define two interface-only, clean-room plug-in ports. AmlCopilot is an
out-of-tree LLM assistant whose response is advisory guidance for a
human reviewer, never authoritative, and the port carries no business
prompt. AutomatedSuspensionPort suspends a subject on a caller-decided
signal, encoding no rule for what that signal is; a replayed signal maps
to a first-class already-suspended outcome so the port is idempotent.
Both take opaque references and generic context, with no implementation,
Spring, or PII.

Closes #269
@tiana-code tiana-code added this to the v0.3.0 milestone Jun 19, 2026
@tiana-code
tiana-code merged commit e44095e into main Jun 19, 2026
8 checks passed
@tiana-code
tiana-code deleted the feat/E-04-plugin-ports branch June 19, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

F-04.9 Generic compliance plug-in ports (AmlCopilot + suspension)

1 participant