Skip to main content
Glama
Quark-Protocol (QXP v1.0)

Quark-Protocol (QXP v1.0)

by pjrpjr
README.md
# Quark-Protocol (`QXP/1.0`)

**Apache-2.0 Open Protocol, 30 Pure-Static Task/Domain Adapters, 5 Free Offline Compliance & Trade SaaS Killers, Pure-Stdlib CLI/MCP Server & `LH-100` Constitutional CI Gate.**

> **UPL & Non-Advisory Disclaimer**: Quark-Protocol (`QXP/1.0`) and its offline `killers/` utilities provide informational pre-audit checks and declarative engineering parameters only. Nothing in this repository constitutes legal, tax, customs-broker, accounting, medical, or regulatory advice. Regulated sign-offs and statutory filings require independent licensed professionals.
>
> **Trademark & Independence Notice**: Independent alternative; not affiliated with or endorsed by Zonos, FOSSA, Castellum.AI, Avalara, or OneTrust.

---

## Kill Your $500/mo Compliance & Trade SaaS Bill

All 5 offline verifiers in [`killers/`](killers/) run **100% locally** on **Python 3.12+ standard library only** (zero API keys, zero network calls, zero third-party dependencies, deterministic `SHA-256` verification receipts). When you need live government/carrier feeds, hardware-attested receipts, or zero-custody escrow clearing, upgrade via `--upgrade-live` to the Sovereign Live Gateway.

| Incumbent SaaS Category | Public 2026 Incumbent Pricing (Verified / Market) | `$0` Apache-2.0 Offline CLI (`quark kill ...`) | Sovereign Live Gateway (`/mcp`, `/llms.txt`, `$49 /crucible`) |
| :--- | :--- | :--- | :--- |
| **Zonos** (`https://zonos.com/pricing`)<br>*Cross-border duties, VAT & de minimis* | `$2/order + 10% + $2,000–$4,000 setup` & Classify tiers | **`quark kill dutyslice`**<br>2026 US post-de-minimis + EU `EUR 3/HS` (`<EUR 150`), all 27 EU VAT rates, US MFN/301/IEEPA, MPF/HMF, Form 5106 physical-address check | Live `CBP ACE / eRulings` & `EU EBTI` broker routing + `FBO` / `Escrow.com` clearing |
| **FOSSA** (`https://fossa.com/pricing`)<br>*SBOM & open-source license compliance* | Free cap at `25 devs / 5 repos`; enterprise custom quote (`~$15k–$45k+/yr` market) | **`quark kill cleansbom`**<br>SPDX `2.2/2.3` & CycloneDX `1.4/1.5/1.6` parser, recursive SPDX `AND/OR/WITH` evaluator, M&A contagion gate (`AGPL/SSPL` blocker) | Continuous registry drift monitoring + `Tier-A` IP counsel blind-review sign-off (`M-RCP-35`) |
| **Castellum.AI** (`https://www.castellum.ai/`)<br>*Sanctions, entity & TIN/LEI screening* | Custom enterprise quote | **`quark kill clearscreen`**<br>Unicode NFKD + multi-metric fuzzy matching (Levenshtein, Jaccard, Dice, Soundex), IRS EIN/TIN format check, ISO 17442 LEI MOD-97-10, `FCRA § 611` guard | Real-time `OFAC/BIS/GLEIF vLEI` & `IRS TIN Match` cryptographic audit receipts |
| **Avalara Cross-Border** (`https://www.avalara.com/us/en/products/international.html`)<br>*HTS classification & rules of origin* | Custom quote (`~$50k–$75k+/yr` market) | **`quark kill tariffguard`**<br>HTS-10/HS-6 validator, 2026 Section 301/232 alerts, legacy citation trap detection, CTH/CTSH & RVC Build-Down/Build-Up origin math | `15`-minute sovereign gazette hot-patching + licensed customs broker `POA` & `eRulings` filing |
| **OneTrust Data Mapping** (`https://www.onetrust.com/pricing/`)<br>*PII/PHI discovery & cross-border transfers* | Custom quote (`~$19k–$32k+/yr` market) | **`quark kill privacysbom`**<br>Luhn-validated `PAN`/`CVV` redline detector, all 18 HIPAA Safe Harbor identifiers (`45 CFR § 164.514(b)(2)`), GDPR Ch. V SCC/TIA matrix (zero raw PII echoed) | Confidential enclave (`SEV-SNP/TDX`) attestation + `HIPAA` expert statistical certification |

*(Pricing notes: Zonos and FOSSA caps/rates reflect public pricing pages; annual enterprise ranges for FOSSA, Avalara, and OneTrust reflect public enterprise market estimates; Castellum.AI uses custom enterprise quoting.)*

---

## 1-Line Install & Quickstart

Requires **Python 3.12+** (zero `pip install`, zero external packages):

```sh
curl -fsSL https://raw.githubusercontent.com/pjrpjr/quark-protocol/main/install.sh | sh
```

Or run directly from a cloned checkout:

```sh
git clone https://github.com/pjrpjr/quark-protocol.git
cd quark-protocol

# Health check & constitutional verification
python3 -E -s -B -W error -m quark_cli doctor
python3 -E -s -B -W error -m quark_cli lh100 spec/tda/
python3 -E -s -B -W error -m quark_cli check --strict

# Run all 5 offline compliance & trade SaaS killers
python3 -E -s -B -W error -m quark_cli kill dutyslice killers/dutyslice/sample_input.json --pretty
python3 -E -s -B -W error -m quark_cli kill cleansbom killers/cleansbom/sample_input.json --pretty
python3 -E -s -B -W error -m quark_cli kill clearscreen killers/clearscreen/sample_input.json --pretty
python3 -E -s -B -W error -m quark_cli kill tariffguard killers/tariffguard/sample_input.json --pretty
python3 -E -s -B -W error -m quark_cli kill privacysbom killers/privacysbom/sample_input.json --pretty

# Append --upgrade-live on any killer to attach Sovereign Live Gateway & $49 Crucible routes
python3 -E -s -B -W error -m quark_cli kill dutyslice killers/dutyslice/sample_input.json --upgrade-live --pretty

# Inspect gateway routes or start stdio MCP JSON-RPC 2.0 server
python3 -E -s -B -W error -m quark_cli route
python3 -E -s -B -W error -m quark_cli mcp
```

---

## Sovereign Live Gateway & Public `$49` SaaS Slaughter Crucible

Configured via [`spec/gateway_endpoints.json`](spec/gateway_endpoints.json) and overridable with `QUARK_GATEWAY_URL`, `QUARK_MCP_URL`, or `QUARK_CRUCIBLE_URL`:

- **Live MCP Endpoint**: `https://raf.fastmesh.dev/mcp`
- **Agent Discovery (`llms.txt`)**: `https://raf.fastmesh.dev/llms.txt`
- **SaaS Slaughter Bounty Crucible (`$49`)**: `https://raf.fastmesh.dev/crucible`

---

## Protocol Architecture (`QXP/1.0`)

1. **16 Frozen Meta-Quark Axioms ([`spec/mq16.json`](spec/mq16.json))**: Four immutable families (`MQ-01..16`) covering sovereign charters & hard wait clocks (`Q1`), zero-custody clearing & escrow (`Q2`), hardware truth & decoupled sign-off (`Q3`), and shared physical/orbital/logistics capacity (`Q4`).
2. **30 Pure-Static TDAs ([`spec/tda/`](spec/tda/))**: Covering all 4 generations of the `36-RAF V2.0` closed catalytic network (`Gen 0` `$13,600` + `Gen 1` `$22,700` + `Gen 2` `$18,200` + `Gen 3` `$13,600` = **`$68,100`**, supporting 17 Wave-1 orthogonal cores `$65,000` for `$133,100` total, `SCC = 17/17 = 100%`).
3. **Three Non-Waivable Pillars**:
   - `V2-OP-05`: `$0` third-party platform custody (`Bank-as-Record FBO` / licensed `MoR` / `Base USDC x402`).
   - `V2-OP-09`: Physical read-only hardware binary signing (`0` PLC/equipment writeback).
   - `V2-OP-14`: Objective-receipt `Escrow.com` / `DACA` lockboxes.
   - *(Ablating all three pillars collapses `SCC -> 1` and `R_0 -> 0.19` within Day 10–14.)*
4. **20% Source-Split Maintainer Royalties ([`ROYALTY_PROTOCOL.md`](ROYALTY_PROTOCOL.md))**: Contributors of active `LH-100`-verified `TDA` packs earn `20%` source-split revenue (`$0` platform custody, `IRS IRIS` `1042-S` / `W-8BEN-E` compliant).
5. **Open Trust & Witness Protocols**:
   - [`docs/QXP_V1_SPEC.md`](docs/QXP_V1_SPEC.md) — Complete `QXP/1.0` architecture, wait clocks, `VULN-01..07` disclosures & `H-1..H-6` circuit breakers.
   - [`docs/TIER_A_BLIND_REVIEW_PROTOCOL.md`](docs/TIER_A_BLIND_REVIEW_PROTOCOL.md) — `M-RCP-35` outcome-decoupled licensed human sign-off (`5%` golden traps, `15%` blind overlap).
   - [`docs/PHONE_AS_ORACLE_C2PA_SPEC.md`](docs/PHONE_AS_ORACLE_C2PA_SPEC.md) — `V2-OP-10` hardware `C2PA` smartphone witnessing (`$5–$50` per receipt).
   - [`spec/retired_2026_blacklist.json`](spec/retired_2026_blacklist.json) — Machine-readable `LH-100` gate blocking retired 2026 portals (`IRS FIRE`, `Lemon Squeezy`, `Mercury Treasury` in Wave 0/1, active `Section 321` reliance, `19 CFR 177.9`) and executable glue keys.

---

## Contributing & License

- See [`CONTRIBUTING.md`](CONTRIBUTING.md) and [`.github/PULL_REQUEST_TEMPLATE.md`](.github/PULL_REQUEST_TEMPLATE.md) before submitting a `TDA` PR.
- Released under the [Apache License 2.0](LICENSE).