Specter
EU AI Act compliance, with five characters working the case.
Ontology · taxonomy · LLM-as-Judge · grounded Q&A · five-voice agent overlay · comic-book SPA.
Ships as a Claude Code plugin, a Python library, and a local web app.
# Claude Code plugin (recommended) — get 6 slash commands + 6 MCP tools
pip install 'specter[plugin]>=0.1.6'
claude plugins install github:Peaky8linders/specter-oss/claude-plugin
# Python library — for direct programmatic access
pip install specter # core: data + LLM-as-Judge
pip install 'specter[api]' # adds FastAPI router for grounded Q&A
pip install 'specter[anthropic]' # adds Anthropic Claude-backed retriever
pip install 'specter[openai]' # adds OpenAI ChatGPT-backed retriever
Why this exists
- Ground LLM output against the regulation. Every reference is validated against a frozen 113-article + 13-annex catalog of Regulation (EU) 2024/1689 — hallucinated articles never reach the wire.
- Catch reward-hacking in compliance roadmaps. Six-check
ComplianceRewardHackDetector (LLM-as-Judge) screens proposed remediation tasks for plagiarism, KB-reality violations, coverage-plausibility breaks, contract-completeness gaps, and rebutted-excuse matches. The detector OWNS the origin label — an agent that lies and self-labels as agent_novel when it actually plagiarised a prior task is caught by SequenceMatcher, not trusted on its self-report.
- Surface a regulator-defensible taxonomy. Four-axis agentic-AI compound-risk classification (cascading / emergent / attribution / temporal) anchored to EU AI Act articles + KB maturity dimensions, grounded in AI Agents Under EU Law (working paper, 7 April 2026).
Three ways to use it
1. Claude Code plugin
Specter ships as a Claude Code plugin so you can drive it from your
editor / agent session with slash commands. No hosted backend
required — the MCP server runs locally against the bundled article
catalog.
pip install 'specter[plugin]>=0.1.6'
# From a checkout of the repo:
claude plugins install ./claude-plugin
# Or from the public GitHub (recommended):
claude plugins install github:Peaky8linders/specter-oss/claude-plugin
Restart Claude Code, then in any session:
/specter:check-article ref="Art. 13(1)(a)"
/specter:taxonomy
/specter:role-obligations role="deployer"
6 slash commands, 6 MCP tools. Full docs in claude-plugin/README.md.
2. Python library
from specter.data.articles_existence import ARTICLE_EXISTENCE
from specter.judge.reward_hack import (
ComplianceRewardHackDetector,
RawProposal,
ResearchGoal,
make_eu_ai_act_policy,
)
policy = make_eu_ai_act_policy(
article_existence=ARTICLE_EXISTENCE,
valid_dimensions=frozenset(["risk_management", "transparency"]),
)
detector = ComplianceRewardHackDetector(
accepted_proposals=[],
answers={},
goal=ResearchGoal(target_value=0.8),
policy=policy,
)
flags = detector.check(RawProposal(
task_id="t1", task_title="Establish risk management",
description="Document Art. 9 risk-management process",
agent="compliance_officer", priority="P1", effort_hours=8.0,
dimension_id="risk_management",
prompt="Set up an Art. 9 risk-management workflow + RAID log",
acceptance_criteria=["RAID log exists", "Workflow documented"],
output_files=["docs/risk-management.md"],
article_paragraphs=["Art. 9", "Art. 999"], # Art. 999 is hallucinated
contract_verification=[{"cmd": "pytest"}],
))
print(flags.blocked, flags.reasons)
# True, ["kb_reality: article_paragraphs ['Art. 999'] not found in the regulation catalog"]
3. Casebook SPA + Suits-themed agent overlay
A local web app turns each compliance question into a "case" worked by
five characters loosely inspired by Suits and the local-first OSS
legal-AI fork mikeOnBreeze/mike-oss
(itself a fork of Will Chen's
willchen96/mike). The UI is a
two-pane ChatGPT-style workspace — recent cases live in a left
sidebar (persisted to your browser's localStorage), and the right pane
shows the selected case as a 5-message stream with citations,
confidence dots, and Jessica's final ruling.
The webapp ships a Settings drawer (sidebar bottom or , key) with
two tabs: