launchguard-ai README

The project's README from github.com/Jack81st/launchguard-ai. As one markdown file: README.md.

LaunchGuard AI

A reviewable product-launch workflow for pricing, policy checks, and Shopify drafts.

Python 3.9–3.12 LangGraph CI Coverage Shopify License: MIT

Quickstart · Architecture · Engineering Report · Threat Model · Roadmap · Contributing


The problem

A supplier record can become a product listing before anyone has checked the margin assumptions, applicable policies, or approval history. LaunchGuard keeps those decisions in one traceable workflow:

catalog and cost inputs
→ sourced FX rate
→ versioned policy citations
→ contribution-margin scenarios
→ structured listing draft
→ deterministic compliance checks
→ durable human review
→ idempotent Shopify DRAFT

LaunchGuard works from catalog and cost data supplied by the operator. It does not estimate demand or marketplace sales. If required evidence or approval is missing, the run stops before Shopify delivery.

LaunchGuard architecture and durable review boundary

How it works

Design choice Implementation Operational value
Checkpointed review LangGraph interrupt() plus SQLite checkpoints and stable thread IDs A run can pause, survive process restart, and resume after review
Deterministic business rules FX, pricing, retrieval, compliance, persistence, and delivery use explicit services Calculations and controls remain inspectable and testable
Traceable inputs Strict CSV/JSON SKU contract with a source reference Reviewers can see where the commercial assumptions came from
Versioned policy retrieval SQLite FTS5, market filters, effective dates, source paths, and citation IDs Reviewers can inspect exactly which rule supported the draft
Unit economics Duty, shipping, fulfillment, fees, VAT, returns, ads, margin, FX, and four stress scenarios Makes commercial feasibility visible before copy is approved
Draft-only delivery Dry-run default, explicit review, deterministic handle, remote lookup, local ledger, Shopify DRAFT status Reduces accidental publishing and duplicate products
Evaluation gate Reproducible cases for clean launches, commercial warnings, and prompt-injection blocking Changes can be measured instead of judged only by demos

Control room

LaunchGuard control room with a product review waiting for approval

Use the control room to start a launch review, compare the recommended price with its floor, inspect the FX source and policy citations, and approve or reject the draft. Runs waiting for review remain available after a restart.

Quickstart

Local Python

git clone https://github.com/Jack81st/launchguard-ai.git
cd launchguard-ai
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
launchguard serve

Open http://127.0.0.1:8080. The default setup works without model or Shopify credentials.

Docker

docker compose up --build

SQLite run history and checkpoints are stored in the launchguard-data volume.

Durable CLI review

Start an offline demonstration run:

launchguard start \
  --catalog examples/catalog.csv \
  --sku LG-BTL-001 \
  --offline

The command returns a run_id and exits with pending_approval. The process can now stop. Resume the same checkpoint later:

launchguard decide \
  --run-id lg_your_run_id \
  --action approve \
  --reviewer "Operations reviewer" \
  --note "Evidence, margin floor, and policy citations reviewed"

Reusing a completed run_id does not create another delivery.

Pricing model

LaunchGuard solves the price required to preserve the target contribution margin:

fixed cost = converted product cost + converted inbound shipping + duty + fulfillment

minimum price = fixed cost /
  (1 - platform fee - VAT - returns reserve - ad cost - target margin)

Each review includes:

The pricing result is decision support, not a forecast. Every input appears in the review package so the assumptions can be checked before approval.

Policy retrieval and generation

Policies are Markdown files with required metadata:

---
id: PRICING-GOVERNANCE-2026-02
title: Contribution Margin and Pricing Governance
market: GLOBAL
effective_date: 2026-02-01
---

SQLite FTS5 retrieves market-appropriate sections and returns the document ID, effective date, source path, content, and score. The default listing builder is deterministic. An OpenAI-compatible endpoint can be enabled for model-written copy, but the response must still pass schema validation and may cite only retrieved evidence IDs.

Shopify safety

Live delivery is unavailable unless all of these conditions are true:

  1. deterministic checks report no blockers;
  2. the graph is resumed with an explicit named reviewer decision;
  3. LAUNCHGUARD_SHOPIFY_MODE=live is configured;
  4. a valid *.myshopify.com domain and Admin API token are present.

The connector then:

Rate limits and transient server failures are retried. GraphQL user errors and partial price-update failures are surfaced rather than converted into success.

Quality evidence

make lint
make test
make eval

CI runs on Python 3.9, 3.11, and 3.12, enforces at least 80% branch-aware coverage, executes the evaluation gate, and builds the production container. Tests use mock transports and never need paid credentials.

Current verification results:

These figures measure the repository's test and regression suite; they do not measure commercial lift. The bundled evaluation reports:

See the engineering report for the design rationale, verification scope, and known limitations.

API

FastAPI exposes:

Method Endpoint Purpose
POST /api/runs Validate evidence and run until completion or review interrupt
GET /api/runs List recent runs
GET /api/runs/{run_id} Read persisted state and audit events
POST /api/runs/{run_id}/decision Resume a pending checkpoint with approve/reject and optional edits
GET /health Container and service health

Interactive OpenAPI documentation is available at /docs.

Repository layout

src/launchguard/
├── api.py                    # FastAPI and control-room API
├── workflow.py               # LangGraph, interrupt, resume, checkpointing
├── models.py                 # Strict evidence and output contracts
├── store.py                  # Run, event, approval, and delivery ledger
├── connectors/
│   ├── catalog.py            # Validated CSV catalog input
│   ├── fx.py                 # Live FX with explicit fallback provenance
│   └── shopify.py            # Guarded GraphQL draft delivery
└── services/
    ├── policies.py           # Versioned FTS5 retrieval
    ├── pricing.py            # Unit economics and stress scenarios
    ├── generation.py         # Deterministic and optional LLM generation
    └── compliance.py         # Deterministic safety and policy checks

Honest boundaries

Originality and license

This repository started with an empty Git history. It is not a fork and contains no BorderPilot source code, assets, history, or documentation. LaunchGuard uses open-source libraries through their documented APIs and is released under the MIT License.

launchguard-ai (Jack81st/launchguard-ai)

pricing
Searching Database…

What is this?LaunchGuard AI is a durable, evidence-first workflow built on LangGraph that reviews product launches: it computes pricing, cites applicable policies, requires human approval, and can create draft Shopify product listings.
Is this a library I import, or a standalone tool?It's a standalone Python service/tool: you run it as a CLI or as a FastAPI server with an API, not something you embed as a library in your own code.
How do I get it running?Run it locally with Python, or start it via Docker, where SQLite run history and checkpoints are stored in the launchguard-data volume.
Do I need Shopify or OpenAI credentials to try it?No. The default setup works without any model or Shopify credentials and runs in dry-run mode; real Shopify delivery needs LAUNCHGUARDSHOPIFYMODE=live plus a .myshopify.com domain and Admin API token.
What stops a bad or unapproved listing from going live?If required evidence or an explicit named reviewer approval is missing, the run halts before any Shopify delivery, and deterministic checks must also report no blockers.
How does the pricing model work?It solves for the price needed to preserve a target contribution margin, factoring in duty, shipping, fulfillment, fees, VAT, returns, ads, and FX, then stress-tests the result against four scenarios like a 3% adverse FX move and +2pp in returns.
What is the control room?It's the review interface where you start a launch, compare the recommended price to its floor, inspect the FX source and policy citations, and approve or reject the draft; pending runs survive a restart.
How are policy citations sourced?Policies are Markdown files with required metadata, retrieved via SQLite FTS5; any generated listing copy can only cite retrieved evidence IDs and must pass schema validation.
How well-tested is this?CI on Python 3.9/3.11/3.12 reports 34 passing tests, 83.76% branch-aware coverage, and 3/3 evaluation cases passing with 100% decision accuracy and citation coverage on the bundled evaluation set.
Creator
Jack81st
Size
2.3 MB
Stars
101
Updated
CommitOct 07
Age
1mo
Commits · 90 Days