⚡ High-speed automated SOX compliance document-to-rule verification, hybrid semantic matching, and .matchbin audit reporting engine for Java.
FastAIMatcher automates enterprise regulatory compliance audits by cross-verifying reference rulebooks (e.g. ISO/ITIL frameworks, SOX policies, security guidelines, HR authorization matrices) against target operational artifacts (Change-Tickets, Deployment Logs, Project Applications, Access Grants) in microseconds without expensive manual inspection.
import fastaimatcher.*;
import java.util.List;
import java.util.Map;
public class Demo {
public static void main(String[] args) {
// 1. Define compliance & policy rules
List<Rule> rules = List.of(
new Rule("SEC-POL-01", Rule.Category.MANDATORY, "Security justification must be documented", List.of("security assessment"), Double.NaN),
new Rule("FIN-POL-02", Rule.Category.NUMERIC_LIMIT, "Capital expense limit max 100,000 EUR", List.of(), 100_000.0),
new Rule("CHG-POL-03", Rule.Category.APPROVAL, "Dual approval (4-eyes principle) mandatory", List.of(), Double.NaN)
);
FastAIMatcher matcher = new FastAIMatcher(rules);
// 2. Validate operational target document (e.g. Jira Ticket or Change Request)
TargetDocument doc = new TargetDocument(
"TICKET-8821",
"Database Migration",
"Change request: The security assessment has been fully conducted.",
Map.of("budget", "65000"),
List.of("Release Manager", "Lead Architect")
);
List<MatchFinding> findings = matcher.match(doc);
for (MatchFinding f : findings) {
System.out.printf("[%s] Rule %s: %s\n", f.status(), f.ruleId(), f.explanation());
}
// 3. Compact FastFileFormat Binary Serialization (.matchbin)
byte[] auditLog = MatcherCodec.encode(findings);
List<MatchFinding> restored = MatcherCodec.decode(auditLog);
}
}- ⚖️ Automated SOX & Compliance Audits — Cross-matches regulatory policies (Soll) directly against operational reality (Ist).
- 🧩 3-Layer Hybrid Matching — Combines symbolic logic (numeric limits, mandatory approvals) with keyword and semantic embedding verification.
- 🔍 Discrepancy & Violation Detection — Automatically flags missing evidence, unapproved changes, and unauthorized privilege escalation.
- 📦 FastFileFormat
.matchbinCompression — Tamper-evident, high-density binary audit trace streaming (Payload ID0x0007). - 🛡️ 100% Air-Gapped & In-Process — Zero cloud dependencies, zero external database roundtrips, sub-millisecond execution.
- 🏢 Enterprise SOX Auditing — Validating that production software deployments exactly match authorized change tickets.
- 📑 Policy & Grant Proposal Verification — Checking budget requests and technical proposals against enterprise policy constraints.
- 👥 HR Matrix vs. Active Directory — Detecting rogue admin privileges and segregation-of-duties (SoD) violations.
- 🔒 Automated Pre-Deployment Gatekeeper — Blocking CI/CD pipeline deployments if compliance rules are violated.
FastAIMatcher is profiled using JMH to guarantee microsecond-level audit throughput.
| Benchmark Operation | Score (ops/ms) | Throughput | Memory Overhead |
|---|---|---|---|
| Compliance Rule Matching (50 Rules/Doc) | ~189,000 ops/ms | > 189 Million rules/sec | 0 bytes allocation |
Binary Audit Report Decoding (.matchbin) |
~223,000 ops/ms | > 223 Million findings/sec | Zero-Copy Streaming |
Binary Audit Report Encoding (.matchbin) |
~67,000 ops/ms | > 67 Million findings/sec | Compact VarInt Delta Buffer |
Run the benchmarks locally: .\run-benchmark.bat
| Method / Class | Description |
|---|---|
new FastAIMatcher(rules) |
Initializes rule matcher with list of compliance constraints. |
matcher.match(document) |
Executes compliance check against target document and returns findings. |
new Rule(id, category, text, keywords, limit) |
Defines a structured compliance condition. |
new TargetDocument(id, title, text, kvs, approvers) |
Encapsulates parsed target document artifact. |
MatcherCodec.encode(findings) |
Serializes audit findings into compressed FastFileFormat binary byte array. |
MatcherCodec.decode(bytes) |
Deserializes .matchbin binary bytes back into List<MatchFinding>. |
| Case | Java Example | Launcher | Description |
|---|---|---|---|
| Live Compliance & Violation Demo | Demo.java | run-demo.bat |
BHO/SOX rule definitions, compliant vs rogue ticket evaluation, and .matchbin audit reporting. |
| JMH Microbenchmark Suite | Benchmark.java | run-benchmark.bat |
High-throughput 50-rule evaluation benchmarks and binary codec speed. |
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastAIMatcher</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastFileFormat</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastBinary</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>fastcore</artifactId>
<version>0.1.0</version>
</dependency>
</dependencies>repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.andrestubbe:FastAIMatcher:0.1.0'
implementation 'com.github.andrestubbe:FastFileFormat:0.1.0'
implementation 'com.github.andrestubbe:FastBinary:0.1.0'
implementation 'com.github.andrestubbe:fastcore:0.1.0'
}Download the latest JARs directly to add them to your classpath:
- ⚖️ FastAIMatcher-0.1.0.jar (SOX Compliance & Hybrid Matcher)
- 📄 FastFileFormat-0.1.0.jar (Dual Binary & Text File Format)
- ⚡ FastBinary-0.1.0.jar (VarInt & Binary Packing)
- ⚙️ fastcore-0.1.0.jar (Foundation Library)
- REFERENCE.md: Full API reference and method signatures.
- PHILOSOPHY.md: Architectural design principles and automated enterprise governance.
- CHANGELOG.md: Release history and version notes.
- ROADMAP.md: Future milestones and planned features.
- COMPILE.md: Instructions for compiling from source.
MIT License. See LICENSE file for details.
- FastAIReasoner — Multi-step reasoning & heuristic rule planning
- FastAIHybrid — Hybrid dense & sparse retrieval fusion
- FastContentParse — Document section & metadata parsing
- FastFileFormat — Universal dual-format binary & text document engine
Part of the FastJava Ecosystem — Making the JVM faster. Small package. Maximum speed. Zero bloat. 🚀📋