mix foundry. compliance. check
(foundry v0.1.4)
Copy Markdown
Reads all regulation files in docs/regulations/, extracts RG-* requirements,
then verifies each one has at least one implementation: pointer to a module
or test, and that a corresponding ExUnit test exists tagged :compliance.
Emits a Foundry.Compliance.CheckResult as JSON.
Usage
mix foundry.compliance.check
mix foundry.compliance.check --json
mix foundry.compliance.check --filter=RG-UK # filter by prefixRequirement syntax in regulation files
Requirements are parsed from Markdown files in docs/regulations/. Each
requirement must follow this structure:
### RG-UK-014
**Summary:** Withdrawals must be processed to original payment method
**Implementation:** `IgamingRef.Finance.WithdrawalTransfer`
**Test tag:** `:rg_uk_014`The parser is lenient — it looks for the RG- prefix and reads the surrounding
lines for implementation and test tag declarations.
Status determination
:implemented— has implementation pointer AND a passing tagged test:partial— has implementation pointer but no tagged test (or test failing):unimplemented— has no implementation pointer:planned— explicitly declared as planned in the regulation file
CI gate
Exits non-zero only if any requirement is :unimplemented on a project that
has coverage_gate: true in its manifest. Planned and partial requirements
do not fail CI — they are surfaced as warnings in the compliance dashboard.