The compliance Skill — The Final Gate Before Archiving
How Datarim's compliance skill detects the task type, applies the matching verification checklist, and routes findings to inline fixes or the backlog before the archive step.
Quality checks at the end of a task tend to find the same things: a method that grew too long, a test that was not written, a configuration file with a hardcoded value that should be an environment variable. The compliance skill runs after /dr-qa and before /dr-archive to catch those issues systematically rather than by memory. It adapts to what the task actually produced.
What it does
The first step is task-type detection. The skill reads the task file and active context to determine whether the output is primarily code, documentation, research, legal text, content, or infrastructure configuration. Each type has its own checklist. A code task runs seven steps: change-set alignment against PRD requirements, code simplification, dead-code removal, test coverage, linter runs, test execution, and CI/CD impact analysis. A content task runs four steps: factual accuracy, AI-pattern removal, platform requirements, and editorial standards.
When a finding surfaces, the skill applies a deferral heuristic. A small fix — one file, at most 100 lines of production code plus tests, no API contract change, reversible by a single commit revert — can be shipped inline within the current task. A larger fix goes to the backlog as a tracked item. The default is to document and hand off; the inline path applies only when all four conditions hold simultaneously.
The output is a compliance report saved to datarim/reports/. The verdict is one of three: COMPLIANT, COMPLIANT_WITH_NOTES, or NON-COMPLIANT. Each re-run of the skill produces a new versioned report file rather than overwriting the previous one.
One concrete example
A task implements a new API endpoint. Compliance runs the software checklist. Step 4 finds that an acceptance criterion declared a numeric coverage threshold but no measurement was taken during QA. The skill installs the coverage tool, runs it, records the actual percentage — say 91.5% against an 80% threshold — and marks that step as PASS. A finding that says "presumed met" is not accepted for thresholded criteria; the number must be measured.
When it loads
The skill is invoked by /dr-compliance, which runs after /dr-qa in the standard pipeline. It is also invoked directly when the operator needs a standalone verification pass without running the full QA stage. The compliance report becomes part of the archive bundle, providing a permanent record of what was verified and what was deferred.
Read about what Datarim is for the full pipeline picture, or see the /dr-compliance command reference for the invocation contract.