npm @nugehs/bouncerstdioupdated 2mo ago
Static compliance-controls checker β the controls a regulation requires, verified in your code.
What can you do with bouncer?
bouncer
Static compliance-controls checker β the controls a regulation requires, verified in your code.
nugehs.github.io/bouncer-web (site)

bouncer verifies that the controls a regulation requires actually exist in your code β UK Online Safety Act, ICO Children's Code (AADC), and Nigeria (NDPC, FCCPC, FIRS) β expressed as deterministic rule packs. It runs in CI, exits non-zero when a required control is missing, and needs no LLM.
It checks IDs at the door so non-compliant code doesn't get in.
bouncer is an engineering aid, not legal advice. A green report means the coded controls a rule looks for were found β it is not a substitute for a compliance / DPO review.
Why
Regulators now expect demonstrable controls: age assurance, high-privacy defaults for children, report/block affordances on user-generated content, a DPIA, a risk assessment. Those are concrete things that either exist in a codebase or don't. bouncer turns a regulation into a set of static checks over your repo, the same way tieline turns an API contract into drift checks β the engine knows nothing about the law; the rule packs do.
bouncer vs semgrep / policy-as-code
Scanners like semgrep, CodeQL, or Snyk answer "is there bad code here?" β they
hunt for vulnerabilities and dangerous patterns that shouldn't exist. bouncer
answers the opposite question: "does the code the regulation requires actually
exist?" β age assurance on sign-up, report/block on UGC surfaces, high-privacy
defaults for children. A repo can be vulnerability-free and still fail every one
of those obligations. Policy-as-code tools (OPA/Rego, Conftest) gate configs and
infrastructure against policy; bouncer gates application source against
regulatory rule packs, with file:line evidence for every control and an honest
unknown when a surface can't be located. In short: semgrep finds
vulnerabilities; bouncer proves required controls exist. They complement each
other β run both.
Install
npx @nugehs/bouncer init
npx @nugehs/bouncer check
Or clone and run with plain Node (zero runtime dependencies, Node β₯ 18).
Usage
bouncer init [path] # write a starter bouncer.config.json
bouncer check # run packs, print report, exit 1 on a missing control
bouncer check --pack uk-aadc # restrict to one pack
bouncer check --status fail # show only the failures
bouncer report --out report.html # self-contained HTML audit report
bouncer list # every rule the configured packs apply
bouncer explain <ruleId> # what a rule requires + how it is checked
bouncer packs # rule packs shipped with bouncer
bouncer doctor # sanity-check config, adapter, packs
bouncer mcp # start the MCP server (stdio)
Verdicts
| Verdict | Meaning |
|---|---|
| pass | the required control was found (evidence: file:line) |
| fail | the surface exists, but no evidence of the control was found |
| unknown | the surface could not be located in this repo β can't determine, not a pass |
unknown is deliberate: bouncer never reports a green pass for a surface it could
not find. Missing surface β honest "can't determine".
Configuration
bouncer.config.json:
{
"target": {
"adapter": "next",
"repo": "./my-app",
"roots": ["app", "src", "components"]
},
"packs": ["uk-osa", "uk-aadc"],
"packDirs": [],
"ignore": [],
"failOn": ["fail"]
}
adapterβ how regulation surfaces (sign-up, profile, chat, livestreamβ¦) map onto files for your stack.
Adapters shipped today:
next(App Router) andreact-native. That's it β if your stack isn't covered, an adapter is a single small file mapping surface aliases to file globs (seesrc/lib/adapters/next.js). Adapter PRs are very welcome βnuxt,sveltekit,remix,flutter,djangoare all natural candidates.
packsβ which rule packs to run. Built-ins:uk-osa,uk-aadc,ng-ndpc,ng-fccpc,ng-firs.packDirsβ extra directories of your own*.jsonpacks.ignoreβ rule ids to skip.failOnβ which buckets makecheckexit non-zero (default["fail"]).
Rule packs
A pack is JSON. Each rule maps a legal standard to a static assertion over a surface:
{
"id": "aadc.geolocation-default-off",
"standard": "Standard 10 β Geolocation",
"severity": "high",
"surface": "profile",
"intent": "Geolocation must default to off for children.",
"fix": "Default any location-sharing setting to off.",
"assert": {
"find": "(geo|location)[^\\n;,]{0,30}(default|initial)[^\\n;,]{0,15}(false|off)",
"in": ["profile", "any"],
"expect": "present"
}
}
Assertion nodes:
{ "find": "<regex>", "in": "<surface|glob>", "expect": "present|absent" }{ "allOf": [ β¦ ] }Β·{ "anyOf": [ β¦ ] }Β·{ "not": β¦ }
in accepts a surface alias (resolved by the adapter), an array of aliases/globs,
or a raw glob. expect: "absent" flips the meaning β a match is a violation
(used for nudge patterns, self-declared age checkboxes, etc.).
Surfaces (next adapter)
any, signup, auth, profile, chat, livestream, ugc, governance.
Nigeria packs
For a platform operating in Nigeria, three packs ship built-in:
ng-ndpcβ Nigeria Data Protection Act 2023 (NDPC): privacy notice, opt-in & granular consent, data-subject rights, encryption, retention/erasure, NDPA localization, DPO designation, 72-hour breach plan, cross-border safeguards.ng-fccpcβ consumer protection (FCCPC): blanket "no refund / all sales final" clauses flagged as void β and high-precision, so a tiered or conditional refund policy doesn't trip it β plus refund-policy present, no drip pricing, explicit terms acceptance, terms of service present.ng-firsβ tax (FIRS): 7.5% VAT rate, VAT on commission, WHT on payouts, VAT tax invoice.
Some obligations are process, not code β NDPC registration, signed cross-border
DPAs, the WHT remittance itself. Those rules surface as gaps to track (add
them to ignore with a note), not things a static scan can prove.
MCP
bouncer is also an MCP server (stdio), so an agent can pull the same deterministic results:
| Tool | Purpose |
|---|---|
compliance_check |
run packs, return per-control verdicts + evidence |
list_rules |
list rules the configured packs apply |
explain_rule |
a rule's standard, intent, fix, and how it is checked |
list_packs |
available rule packs |
// .mcp.json
{ "mcpServers": { "bouncer": { "command": "npx", "args": ["-y", "@nugehs/bouncer", "mcp"] } } }
CI
- run: npx @nugehs/bouncer check
Fails the build when a required control goes missing β e.g. someone removes an age-gate or a report button from a UGC surface.
Tests
npm test # node --test β zero dependencies, nothing to install
The suite runs on Node's built-in test runner against throwaway fixture repos:
glob/brace expansion, every assertion probe (find, allOf/anyOf/not,
allInFile + within windows, expect: "absent"), the pass/fail/unknown
verdict semantics, and pack loading. CI runs it on Node 18, 20, and 22.
License
MIT
Part of the toolchain
bouncer is one of four tools that form a deterministic trust layer for AI-assisted development. Each answers a question people keep handing to an LLM β with static analysis instead.
- repoctx β context: what does this change actually touch?
- tieline β contracts: did the front end and back end quietly stop agreeing?
- bouncer (this tool) β compliance: could you defend this to Ofcom?
- aiglare β governance: where can the model do something you can't undo?
More at segunolumbe.com. static analysis, never the model.
Install
Add bouncer to your client. Pick the one you use.
claude mcp add bouncer -- npx -y @nugehs/bouncercodex mcp add bouncer -- npx -y @nugehs/bounceramp mcp add bouncer -- npx -y @nugehs/bouncer{
"mcpServers": {
"bouncer": {
"command": "npx",
"args": [
"-y",
"@nugehs/bouncer"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"bouncer": {
"command": "npx",
"args": [
"-y",
"@nugehs/bouncer"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"bouncer","command":"npx","args":["-y","@nugehs/bouncer"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"bouncer": {
"command": "npx",
"args": [
"-y",
"@nugehs/bouncer"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"bouncer": {
"command": "npx",
"args": [
"-y",
"@nugehs/bouncer"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"bouncer": {
"command": "npx",
"args": [
"-y",
"@nugehs/bouncer"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"bouncer": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@nugehs/bouncer"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"bouncer": {
"command": {
"path": "npx",
"args": [
"-y",
"@nugehs/bouncer"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @nugehs/bouncerRun `goose configure`, choose **Add Extension β Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance22/25
- Trust6/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 77 days ago
- Has a release history
- Repository is not archived
- No licence detected
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint β no local install
Version history
| Versions | Published |
|---|---|
| 0.2.0Latest | Jun 16, 2026 |
| 0.1.3 | Jun 10, 2026 |
| 0.1.0 | Jun 7, 2026 |