End-to-end pipeline that converts government regulation documents (PDF/HTML) into working compliance software. Powered by Anthropic Claude Opus 4.6 as the AI backbone for quality assurance, deep analysis, and intelligent compliance evaluation.
- Ingests regulation documents (EU AI Act PDF)
- Parses articles into structured clauses with deterministic IDs
- Extracts requirements using Claude Sonnet 4.5 (with Judge Gate A validation by Claude Opus 4.6)
- Formalizes requirements into machine-checkable rules (with Judge Gate B validation)
- Evaluates AI system profiles against 53 compliance rules
- Analyzes compliance posture with Claude Opus 4.6 deep AI analysis
- Exports reports (JSON/HTML) with full audit trail
Evaluates a fictional recruitment AI system ("TalentScreen AI") against EU AI Act Articles 9-15 (high-risk AI requirements).
Expected result: Partial Compliance (78.4/100) with critical gaps in automation bias safeguards and disaggregated performance metrics.
- Python 3.12+
- Node.js 18+
- An Anthropic API key
git clone https://github.com/Mougatsu/claudehackaton.git
cd claudehackatoncp .env.example .env
# Edit .env and set your ANTHROPIC_API_KEYpip install -e .uvicorn regulationcoder.api.app:app --host 0.0.0.0 --port 8000 --reloadThe API will be available at http://localhost:8000 (Swagger docs at http://localhost:8000/docs).
cd dashboard
npm install
npm run devThe dashboard will be available at http://localhost:3000.
- Open http://localhost:3000/evaluate
- Click "Load Demo" to populate the TalentScreen AI profile
- Click "Run Evaluation" for instant deterministic compliance check
- Click "Deep AI Analysis (Claude Opus 4.6)" for AI-powered deep analysis (~60-90s)
# Run compliance check from command line
regulationcoder check --profile tests/fixtures/talentscreen_profile.json --regulation eu-ai-act-v1
# Verify audit trail integrity
regulationcoder verify-audit --log-dir ./audit_logsRegulation PDF → Ingestion → Parsing → Extraction (Claude Sonnet 4.5)
→ Judge Gate A (Claude Opus 4.6) → Formalization (Claude Sonnet 4.5)
→ Judge Gate B (Claude Opus 4.6) → Evaluation Engine
→ Deep AI Analysis (Claude Opus 4.6) → Compliance Report
| Layer | Technology |
|---|---|
| AI Engine | Anthropic Claude Opus 4.6 + Sonnet 4.5 |
| Backend | FastAPI, Pydantic v2, Python 3.12 |
| Frontend | Next.js 14, Tailwind CSS, shadcn/ui, Recharts |
| CLI | Click + Rich |
| Audit | SHA-256 hash-chained append-only log |
| Method | Path | Description |
|---|---|---|
| POST | /api/evaluate/ |
Deterministic compliance evaluation |
| POST | /api/evaluate/ai-analysis |
Deep AI analysis (Claude Opus 4.6) |
| GET | /api/regulations/ |
List loaded regulations |
| GET | /api/requirements/ |
List extracted requirements |
| GET | /api/rules/ |
List compliance rules |
| GET | /api/audit/logs |
View audit trail |
| GET | /api/audit/verify |
Verify hash chain integrity |
src/regulationcoder/
core/ engine.py, judge.py, ai_analyzer.py, pipeline.py, config.py
models/ clause.py, requirement.py, rule.py, profile.py, evaluation.py, ai_analysis.py
ingestion/ pdf_processor.py, html_scraper.py
parser/ segmenter.py, citation_extractor.py, tree_builder.py
extraction/ requirement_extractor.py (Claude Sonnet 4.5)
formalization/ rule_generator.py (Claude Sonnet 4.5)
rules/ eu_ai_act_v1/ (Articles 9-15, 53 rules)
audit/ logger.py, chain.py (hash-chained audit trail)
exporters/ json_exporter.py, html_exporter.py
api/ FastAPI app + routers
cli/ Click CLI
dashboard/ Next.js 14 frontend
src/app/ Pages: evaluate, requirements, rules, audit, upload
src/components/ ScoreCard, ComplianceChart, RuleResultRow
src/lib/ api.ts (typed API client)
MIT
