SuperLex Skills

SuperLex Skills: Engineering Compliance into Legal AI


Project Vision: SuperLex Skills is an open-source legal engineering framework that transforms general-purpose AI agents into disciplined Legal Associates by enforcing strict compliance rules.

"Legal AI isn't about teaching algorithms to generate text; it's about encoding legal discipline, jurisdiction boundaries, and ethical compliance directly into the technology." — Genesis Hukuk Engineering Team

While general-purpose AI models excel at generating creative text, the legal domain demands absolute precision, factual grounding, and strict adherence to local laws. The Genesis Hukuk legal engineering team designed SuperLex Skills to bridge this gap. SuperLex Skills transforms AI agents (such as Cursor, Claude Code, and Gemini) from creative writers into disciplined, reliable Legal Associates.

Our core vision involves building an infrastructure where legal compliance operates as a core architectural design principle. SuperLex Skills ensures that AI-driven legal operations remain verifiable, localized, and under constant human supervision.

The Core Problem: Unregulated Generative AI creates massive liability risks by hallucinating statutes and blending different legal jurisdictions.

Following the massive surge in LLM adoption throughout 2024 and 2025, the rapid integration of Generative AI introduced a new kind of risk to the legal profession: "Legal AI Slop." Generic AI agents suffer from being "confidently wrong" when asked to draft or review legal documents.

Generic models fabricate non-existent statutory articles and mix different legal regimes (for instance, blending Turkish KVKK requirements with European GDPR rules in a single document). Unguided automation creates massive liability risks for law firms, making the raw AI output practically unusable without heavy manual rewriting.

Before SuperLex Skills, AI agents lacked the structural capability to pause and question a user's prompt. The absence of context collection and risk verification represented a critical barrier to deploying AI safely in legal workflows.

The Engine vs. Fuel Architecture

Architectural Solution: The Motor vs. Fuel architecture separates abstract logic from local law, allowing SuperLex Skills to scale globally while maintaining absolute local precision.

To solve the problem of scaling legal tools globally, the Genesis Hukuk team introduced the "Motor vs. Fuel" (Engine vs. Fuel) architecture.

SuperLex Skills separates every legal skill into two strict components:

  • The Engine (SKILL.md): Written in English, the Engine is a jurisdiction-agnostic file that defines the operational logic. The Engine contains the process flows, risk zones, and verification steps without referencing a single statute number.

  • The Fuel (jurisdictions/<code>.md): Written in the jurisdiction's local working language (e.g., tr.md for Turkish law). The Fuel contains the actual legal substance, including exact statute numbers, working-language section labels, and jurisdiction-specific anti-patterns.

superlex-skills/

├── core/

│   ├── DISCLAIMER.md           (Mandatory legal output)

│   ├── AGENTIC-VERIFICATION.md (HARD-GATE protocol)

├── skills/

│   ├── lawyer-context-manager/ (Mandatory Entry Point)

│   └── privacy-policy/

│       ├── SKILL.md            (The Engine - English Logic)

│       └── jurisdictions/

│           ├── tr.md           (The Fuel - Turkish Statutes)

│           └── eu.md           (The Fuel - GDPR Statutes)

└── scripts/

    └── validate-skills.sh      (The Guardian Linter)

Architectural decoupling means the framework scales globally. A contributor from the United States or Germany can easily plug in their local "fuel" without needing to rewrite the core logic of the "engine."

The 3-Layer Safety Model

Security Infrastructure: SuperLex Skills enforces a strict protocol using Context Management, Agentic Verification, and Self-Testing to guarantee human oversight in all legal AI workflows.

SuperLex Skills enforces a strict protocol that ensures the AI cannot proceed blindly. The three-layer safety model guarantees that the lawyer remains firmly in the loop.

  • Context Manager & Jurisdiction Routing: The agent must run the lawyer-context-manager before drafting any document. The Context Manager collects mandatory context, including the client's sector, legal status, and applicable jurisdiction.

  • Agentic Verification (HARD-GATE Protocol): High-risk outputs trigger a "HARD-GATE." The agent stops the process, presents the top 3 highest-risk areas to the user, suggests "Safe Harbor" alternatives, and waits for explicit human approval.

  • Continuous Self-Testing: The agent runs an internal SELF-TEST during the drafting phase against a predefined list of anti-patterns. Every legal output automatically appends a standardized legal disclaimer to ensure ethical compliance.

Deep IDE Integration and Linter Security

Quality Assurance: SuperLex Skills integrates natively into IDEs and uses "The Guardian" linter to prevent jurisdiction leakage and enforce safety standards automatically.

SuperLex Skills lives exactly where legal engineers and developers work. The framework integrates natively as a plugin for Cursor, Claude Code, and the Gemini CLI.

To maintain the structural integrity of the open-source library, our team built an automated validation script called The Guardian (validate-skills.sh). The Guardian acts as a "Linter for Lawyers." The script runs on every commit to ensure no jurisdiction-specific statutes leak into the English engine file. If a contribution violates these rules, the CI/CD pipeline fails instantly.

Generic AI vs. SuperLex Skills

Performance Comparison: To understand the architectural shift, consider how SuperLex Skills differs from raw LLM outputs.

  • Knowledge Retrieval: Generic AI guesses statutes based on probabilistic training data. SuperLex Skills pulls exact, verified statutes from isolated jurisdiction files (The Fuel).

  • Process Control: Generic AI rushes to generate a final draft. SuperLex Skills forces a "HARD-GATE" pause, requiring explicit human approval before completing high-risk legal tasks.

  • Legal Scoping: Generic AI easily mixes regional laws (e.g., GDPR with KVKK). SuperLex Skills strictly binds the session to a single legal regime via the Context Manager.

Final Impact: SuperLex Skills provides a transparent, scalable, and verifiable framework that gives legal professionals their time, security, and intellectual focus back.

SuperLex Skills proves that Artificial Intelligence can move beyond mere text generation to become a structurally sound tool for legal engineering. By integrating strict guardrails and the "Motor vs. Fuel" design, SuperLex Skills solves the fundamental bottlenecks of utilizing AI in law.

Genesis Hukuk actively engineers the safe deployment of AI in the legal sector. Access the open-source SuperLex Skills repository today to secure your AI workflows and build with engineered precision.