PHALUS¶
Private Headless Automated License Uncoupling System
PHALUS is a self-hosted, single-operator tool for AI-powered clean room software reimplementation. Feed it a dependency manifest and it runs a two-phase, isolation-enforced pipeline: one agent reads only public documentation and produces a formal specification; a second agent, in a completely separate context, reads only that specification and implements the package from scratch. The output is functionally equivalent code under whatever license you choose, with a full audit trail.
No accounts. No payments. No SaaS. Your machine, your API keys, your output.
Key Features¶
-
Two-agent isolation
Agent A (Analyzer) reads public documentation only. Agent B (Builder) reads the specification only. The two agents never share context.
-
Full audit trail
Every pipeline step is recorded in an append-only JSONL file with SHA-256 checksums. The entire log is hashed on completion for tamper detection.
-
Multi-ecosystem
Parse
package.json,requirements.txt,Cargo.toml, andgo.mod. npm, PyPI, crates.io, and Go module proxy are all supported today. -
Flexible output
Choose any permissive license for the generated code. Optionally reimplement in a different language to maximise structural divergence from the original.
-
CSP caching
The Clean Room Specification Pack produced by Agent A is cached by content hash. Repeated runs on unchanged packages skip Agent A entirely.
-
Local web UI
An optional browser-based interface for manifest upload, live progress monitoring via Server-Sent Events, and output download.
Architecture¶
flowchart TD
CLI["CLI / Web UI\nphalus run manifest.json"]
PARSER["Manifest Parser\nnpm · PyPI · Cargo · Go"]
REGISTRY["Registry Resolver\nFetch metadata"]
DOCS["Doc Fetcher\nREADME · API docs · type defs"]
AGENT_A["Agent A — Analyzer\nProduces CSP Specification"]
FIREWALL["Isolation Firewall\nSHA-256 logged crossing"]
AGENT_B["Agent B — Builder\nImplements from spec only"]
VALIDATOR["Validator\nSyntax · tests · similarity"]
OUTPUT["Output Directory\nSource · CSP · audit trail"]
CLI --> PARSER
PARSER --> REGISTRY
REGISTRY --> DOCS
DOCS --> AGENT_A
AGENT_A --> FIREWALL
FIREWALL --> AGENT_B
AGENT_B --> VALIDATOR
VALIDATOR --> OUTPUT
Quick Install¶
From crates.io:
Pre-built binary — download from the releases page and place on your PATH.
Docker:
docker pull ghcr.io/phalus-project/phalus:latest
docker run --rm -v "$PWD":/work -w /work ghcr.io/phalus-project/phalus run package.json