0BSD · Self-Hosted · Process-Isolated · Fail-Closed

PHALUS

Private Headless Automated License Uncoupling System

All the ethical ambiguity of AI-powered clean room reimplementation, but you run it yourself. No cute marketing site. No fake testimonials from "Dr. Heinrich Offshore." No offshore subsidiaries. Just a Rust binary, your API keys, a real process boundary, and whatever you tell your lawyers.

$0
SaaS Markup
0
Cloud Accounts Required
2
Audit Layers

Open Source Has Terms & Conditions

Apparently "free as in freedom" doesn't mean "free as in do whatever you want and pretend you wrote it." Who knew.

§

The AGPL Exists

One careless npm install and suddenly your proprietary SaaS must disclose its source. Your investors are calling. Your lawyers are crying. Your quarterly report is weeping.

©

Attribution Is Hard

Keeping track of 2,000+ transitive dependencies and their license terms? That's not engineering, that's archaeology. And your compliance team bills by the hour.

↩

Copyleft Is Contagious

Some licenses require you to share your improvements. Your board didn't raise $40M in Series B so you could give code to strangers on the internet.

☠

Compliance Costs Money

Third-party audits. License scanners. Legal reviews. All so you can use a left-pad function some maintainer wrote in eleven lines.

⚠ Ethical Notice: The above problems are real. The solution this tool provides is ethically questionable and legally untested. It exists for research, education, and to make the point that AI has made clean room reimplementation trivially cheap. If that doesn't concern you, it should.

Same Pipeline. No Middleman.

Malus showed the world this was possible. PHALUS lets you do it in your basement.

malus.sh (SaaS)

×Their robots, their servers
×Pay-per-KB pricing via Stripe
×"MalusCorp-0 License" — proprietary output license
×Indemnification via offshore subsidiary
×Testimonials from "Patricia Bottomline"
×Fun marketing site with confetti animations
→

phalus (Self-Hosted)

✓Your machine, your API keys
✓Free. 0BSD. Forever.
✓You pick the output license (MIT, Apache, BSD, etc.)
✓Indemnification via your own risk tolerance
✓Zero testimonials from anyone, real or fictional
✓This brutalist site with scanline overlays

How License Uncoupling Works

Two AI agents. One fail-closed boundary. No runtime source-code handoff. Legal precedent since 1984.

01

Feed It a Manifest

Drop in your package.json, requirements.txt, Cargo.toml, or go.mod. PHALUS resolves every dependency against the live registry. It knows what you depend on. It judges silently.

$ phalus plan package.json Resolving 47 packages from npm registry... ├── left-pad@1.1.3 3.2 KB MIT ├── is-odd@3.0.1 2.1 KB MIT ├── express@4.18.2 211 KB MIT └── ... 44 more Total: 2.4 MB across 47 packages
02

Agent A: The Reader

Agent A reads only public documentation — READMEs, API docs, type definitions. Never a single line of source code. It produces a Clean Room Specification Pack (CSP): 10 documents describing what the package does, never how. Think of it as the world's most thorough product requirements doc, written by an AI that takes clean room protocol more seriously than your compliance team.

03

The Isolation Firewall

Agent B runs in a separate OS process by default; hardened container mode adds a Docker boundary. It receives the CSP, selected license, and its own runtime settings — not Agent A's context, credentials, or source material. If the requested boundary cannot start, the run stops. There is no silent downgrade. Phoenix Technologies used separate teams in 1984. We use separate runtimes in 2026.

04

Agent B: The Builder

Agent B reads the CSP through a Symbiont 1.21 reasoning loop governed by an exact three-tool allowlist. It writes files, checks API completeness, resolves missing imports, and records a protected, signed per-run journal. Its runtime inputs exclude the original source and documentation; non-completed or unconfirmed effects fail the run. The result is an implementation backed by evidence, not a pinky promise.

05

Validation & Audit

Only after generation does the validator fetch original source for comparison. A passing verdict requires source-backed similarity, license evidence, requested Docker syntax and test execution, and API coverage. Missing tools, missing tests, or missing source fail closed. The top-level audit is hash-chained and binds the signed Symbiont journal — because if you're going to do something legally dubious, you should at least have tamper-evident paperwork.

$ phalus inspect ./phalus-output --audit left-pad@1.1.3 ├── CSP: 10 documents, SHA-256 verified ✓ ├── Firewall: process boundary, no downgrade ✓ ├── Agent B: 3 tools, signed journal ✓ ├── Syntax: checked in Docker, valid ✓ ├── Tests: executed in Docker, 3/3 ✓ ├── API: 100% coverage ✓ ├── Similarity: 0.23 (threshold: 0.70) ✓ ├── Audit: hash chain verified ✓ └── License: MIT (user-selected) ✓

The Pipeline Now Fails Closed

A clean-room claim is only as credible as the boundary and evidence behind it. Both are now enforced.

🧱

Real Worker Boundary

Agent B runs in a separate process by default. Container mode adds a read-only root, dropped capabilities, resource limits, and controlled mounts. Unsafe same-context execution requires an explicit opt-in.

🛡

Governed Symbiont Loop

Symbiont 1.21 allows exactly three Agent B tools and signs a protected per-run journal. Policy denial, unconfirmed effects, and every non-completed termination are treated as failures.

✓

Evidence-Gated Verdicts

Similarity must use fetched source; requested tests and syntax checks must actually execute; license evidence and configured API coverage must pass. A missing checker is a failure, not a free pass.

#

Tamper-Evident Audit

Each audit event carries a sequence, previous hash, and entry hash. Generated files, prompts, and the signed Symbiont journal are bound into the record, so later edits are detectable.

# Safe defaults — boundary or validation failure stops the run
[isolation]
mode = "process"
allow_unsafe_context = false
 
[validation]
run_tests = true
syntax_check = true
min_api_coverage = 1.0
allow_unsafe_local_tests = false

Installation Takes 30 Seconds

The moral reckoning takes longer.

Option 1: Install from crates.io

$ cargo install phalus

Option 2: Download binary

# Linux (x86_64)
$ curl -L https://github.com/phalus-sh/phalus/releases/latest/download/phalus-v0.8.0-x86_64-unknown-linux-gnu.tar.gz | tar xz
$ sudo mv phalus /usr/local/bin/
 
# macOS (Apple Silicon)
$ curl -L https://github.com/phalus-sh/phalus/releases/latest/download/phalus-v0.8.0-aarch64-apple-darwin.tar.gz | tar xz
$ sudo mv phalus /usr/local/bin/

Option 3: Docker

$ docker run -p 3000:3000 \
-e PHALUS_LLM__AGENT_A_API_KEY=sk-ant-... \
-e PHALUS_LLM__AGENT_B_API_KEY=sk-ant-... \
ghcr.io/phalus-sh/phalus:latest

Option 4: Build from source

$ git clone https://github.com/phalus-sh/phalus.git
$ cd phalus && cargo build --release

Quick Start

# Set your API keys (your models, your bill)
$ export PHALUS_LLM__AGENT_A_API_KEY=sk-ant-...
$ export PHALUS_LLM__AGENT_B_API_KEY=sk-ant-...
 
# Liberate a package
$ phalus run-one npm/left-pad@1.1.3 --license mit
 
# Or process an entire manifest
$ phalus run package.json --license apache-2.0 --output ./reimplemented
 
# Launch the web UI
$ phalus serve
PHALUS web UI running at http://127.0.0.1:3000
 
# Scan dependency licenses before selecting a package
$ phalus scan . --save
 
# Inspect your ethically ambiguous output
$ phalus inspect ./phalus-output --audit --similarity

Supported Ecosystems

Ecosystem Manifest Registry
npmpackage.jsonregistry.npmjs.org
Pythonrequirements.txtpypi.org
RustCargo.tomlcrates.io
Gogo.modproxy.golang.org

This Tool Raises Questions

We think you should read the answers before using it.

This tool raises serious ethical and legal questions about open source sustainability. It exists for research, education, and transparent discourse — not to encourage license evasion. The legality of AI-assisted clean room reimplementation is unsettled law.

Questions You Should Be Asking

Is this legal?

Clean room reimplementation has legal precedent going back to Phoenix Technologies' 1984 IBM BIOS clone and Baker v. Selden (1879). Whether that precedent extends to AI-assisted reimplementation is, to use the legal term, completely untested. You are your own legal counsel here. We are a Rust binary, not a law firm.

How is this different from Malus?

Malus is a SaaS product with a payment page, a marketing site, and testimonials from "Dr. Heinrich Offshore." PHALUS is the same two-agent pipeline running on your machine, with your API keys, under a 0BSD license. No cloud. No accounts. No middleman taking a cut of your moral compromise.

What about the original developers?

This is the question that matters. Clean room reimplementation — whether done by humans in 1984 or AI in 2026 — fundamentally challenges the social contract of open source. PHALUS exists to make that challenge visible, not to celebrate it. If the ease of this tool concerns you, good. It should.

Can the output actually pass legal review?

Every run produces evidence of the runtime process: a fail-closed worker boundary, source-backed similarity scoring, a hash-chained audit, and a signed Symbiont journal. That can show what PHALUS did; it cannot prove the model had no training-time exposure or that the output is non-infringing. Whether the evidence satisfies your lawyers depends on your lawyers and jurisdiction.

What happens if isolation or Docker validation is unavailable?

The run fails. PHALUS does not silently downgrade process or container isolation, and requested syntax or test checks must execute before validation can pass. Unsafe same-context execution and local test fallback exist only as explicit opt-ins for people who enjoy signing their own incident reports.

What if the similarity score is too high?

The validator flags anything above your configured threshold (default: 0.70). Some things — like left-pad — have very few correct implementations. If two separate authors independently write the same eleven lines, is that infringement or mathematics? Ask a philosopher. Or a judge. PHALUS just reports the number.

Why is it called PHALUS?

Private Headless Automated License Uncoupling System. The acronym is unfortunate. The name is accurate. We considered alternatives but decided that if you're going to build a tool for ethically ambiguous license circumvention, you might as well commit to the bit.

Can I see the robots?

There are no robots. There is a documentation-analysis agent, an isolated governed implementation loop, an evidence-gated validator, and more cryptographic bookkeeping than anyone asked for. You can see exactly what happens by reading the source code, which is 100% open, unlike whatever you're about to do with the output.

██████╗ ██╗ ██╗ █████╗ ██╗ ██╗ ██╗███████╗ ██╔══██╗██║ ██║██╔══██╗██║ ██║ ██║██╔════╝ ██████╔╝███████║███████║██║ ██║ ██║███████╗ ██╔═══╝ ██╔══██║██╔══██║██║ ██║ ██║╚════██║ ██║ ██║ ██║██║ ██║███████╗╚██████╔╝███████║ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚══════╝

Ready to Uncouple Your Licenses?

Join the zero people who've publicly admitted to using this tool.