SDD Contract
The spec defines input evidence, output schema, citation requirements, confidence threshold, and quality checks.
Spec as ContractFinance Demo
A spec-driven compliance agent that compares MAS notice changes, checks evidence quality, and emits a cited impact report.

Clickable pattern simulator
This simulator does not replace the CLI run, but it makes each step, state, log, gate and final output visible in the browser.
The spec defines input evidence, output schema, citation requirements, confidence threshold, and quality checks.
Spec as ContractThe agent reads the revised notice, previous baseline, and internal AML/KYC SOP as separate evidence sources.
Context TriageLong regulatory text is compacted into changed clauses, obligations, impact rows, and action candidates.
Semantic CompactionInternal policy context grounds the interpretation and keeps source references attached.
RAG PipelineThe output is a structured compliance report with severity, owner, due date, and rationale.
Prompt ChainingWeak citation, low confidence, or high-impact missing action triggers review.
Approval Gate
| Pattern | Design role |
|---|---|
| Context Triage | Separate changed clauses, baseline text, and internal policy before deeper reasoning. |
| Semantic Compaction | Compress long documents into obligations, impacts, and actions without losing traceability. |
| RAG Pipeline | Ground conclusions in retrieved policy and source anchors. |
| Approval Gate | Use confidence and impact to decide when the agent must stop and escalate. |
| Observability Harness | Expose citations, confidence, checks, and generated action items. |
The useful deliverable is not only a summary; it is a chain from clause to impact to action.
The agent should know when it can proceed and when it must ask for review.
The specification becomes a contract for prompts, code, output, and evaluation.
cd workshops/workshop1-compliance
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cd src
python main.py
# optional visual walkthrough
open ../visual/index.htmlworkshops/workshop1-compliance/README.mdimages/training/visual/workshop1-pattern-blueprint.png