Skip to content

SuperInstance/constraint-flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

18 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Constraint Flow ๐Ÿ’ผ

Enterprise automation with exact guarantees. Zero drift. Deterministic workflows.

GitHub stars License: MIT CI Docs

๐ŸŒ Platform: constraint-theory-web.pages.dev


๐Ÿ’ฅ The $40,000 Bug You've Never Caught

# Your financial spreadsheet:
total = 0.1 + 0.2
print(total)  # 0.30000000000000004

# At 1 billion transactions:
# $0.00000000000004 ร— 1,000,000,000 = $40,000 unaccounted

Constraint Flow eliminates an entire class of financial bugs.


๐ŸŽฏ What Is This?

A business automation platform combining spreadsheet interface, multi-agent orchestration, and constraint-based workflow guarantees. Built on Constraint Theory for exact financial calculations and deterministic agent coordination.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                                                             โ”‚
โ”‚   Traditional:  =A1 * 1.1          โ†’  floating-point drift โ”‚
โ”‚   Constraint:   =CT_MUL(A1, 1.1)   โ†’  EXACT. Forever.      โ”‚
โ”‚                                                             โ”‚
โ”‚   $0.00000000000004 error ร— 1B transactions = $40K gone    โ”‚
โ”‚                                                             โ”‚
โ”‚   Constraint Flow: Every cent accounted for. Audit-ready.  โ”‚
โ”‚                                                             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start (2 Minutes)

Prerequisites: Node.js 18+, npm 9+, Docker (optional)

# Install CLI globally
npm install -g @constraint-flow/cli

# Create new workflow project
constraint-flow init invoice-processing

# Start local development server
cd invoice-processing && constraint-flow dev

# Open http://localhost:3000

Alternative: Use without global install

# Using npx (no global install needed)
npx @constraint-flow/cli init invoice-processing
cd invoice-processing
npx constraint-flow dev

Verify installation:

constraint-flow doctor
# โœ“ Node.js 18+ installed
# โœ“ npm 9+ installed
# โœ“ Docker available (optional)
# โœ“ Ready to flow!

Common Issues:

# Port 3000 in use?
constraint-flow dev --port 3001

# Permission issues on macOS/Linux?
sudo npm install -g @constraint-flow/cli

# Node version too old?
nvm install 18
nvm use 18

โœจ Core Features

1. Exact Financial Calculations

# Traditional spreadsheets
=A1 * 1.1          // Floating-point errors accumulate
=SUM(B1:B10000)    // Cumulative rounding errors

# Constraint Flow
=CT_MUL(A1, 1.1)           // Exact multiplication
=CT_FINANCIAL_SUM(B1:B10000)  // Zero cumulative error
=CT_ROUND(value, "cents")  // Regulatory-compliant rounding

2. Constraint-Based Workflow Validation

const workflow = defineWorkflow({
  name: "Invoice Processing",
  steps: [
    { agent: "cattle-extract", action: "extract_invoice_data" },
    { agent: "duck-validate", action: "validate_with_accounting" },
    { agent: "sheep-approve", action: "consensus_approval" }
  ],
  constraints: [
    { type: "amount_limit", max: 10000 },           // Invariant
    { type: "approval_required", when: { ">": 5000 } },  // Conditional
    { type: "sla", maxHours: 24 },                  // SLA
    { type: "audit_trail", required: true }         // Compliance
  ]
});

// Every step validated against constraints
// Invalid states impossible by construction

3. Multi-Agent Task Routing

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              CONSTRAINT ROUTING ENGINE               โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                      โ”‚
โ”‚  Incoming Task โ”€โ”€โ”€โ”€โ–บ Constraint Solver               โ”‚
โ”‚                           โ”‚                          โ”‚
โ”‚         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”‚
โ”‚         โ”‚                 โ”‚                 โ”‚       โ”‚
โ”‚    ๐Ÿ“ง Email Tasks    ๐ŸŒ API Tasks    ๐Ÿ“Š Data Tasks โ”‚
โ”‚         โ”‚                 โ”‚                 โ”‚       โ”‚
โ”‚         โ–ผ                 โ–ผ                 โ–ผ       โ”‚
โ”‚    ๐Ÿ„ Cattle Agent   ๐Ÿฆ† Duck Agent   ๐Ÿด Horse Agentโ”‚
โ”‚                                                      โ”‚
โ”‚  Deterministic routing: Same input โ†’ Same agent     โ”‚
โ”‚  Explainable decisions: Why this agent? Constraints โ”‚
โ”‚                                                      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ’ผ Business Use Cases

๐Ÿงญ Decision Tree: Is This For You?

                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚   Do you process financial data?โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                  โ”‚
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ”‚                        โ”‚                        โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”              โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”             โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”
    โ”‚ FINTECH โ”‚              โ”‚ HEALTH  โ”‚             โ”‚ MFG     โ”‚
    โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜              โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜             โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜
         โ”‚                        โ”‚                        โ”‚
         โ–ผ                        โ–ผ                        โ–ผ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ โœ“ Exact โ”‚             โ”‚ โœ“ HIPAA  โ”‚            โ”‚ โœ“ Supply โ”‚
    โ”‚ amounts โ”‚             โ”‚ audit    โ”‚            โ”‚ chain    โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Financial Services

// Invoice processing with exact amounts
const invoiceWorkflow = {
  steps: [
    { agent: "cattle-extract", action: "parse_invoice" },
    { agent: "sheep-validate", action: "three_way_match" },
    { agent: "cattle-approve", action: "approve_if_valid" }
  ],
  constraints: [
    { type: "exact_amount", precision: "cents" },
    { type: "three_way_match", required: true },
    { type: "approval_chain", minSignatures: 2 }
  ]
};

// Every cent accounted for. Audit-ready.

Healthcare

// Patient data routing with privacy constraints
const patientWorkflow = {
  constraints: [
    { type: "hipaa_compliant", required: true },
    { type: "data_locality", region: "US" },
    { type: "access_log", immutable: true }
  ]
};

// Privacy constraints enforced. Zero data leakage.

Manufacturing

// Supply chain coordination
const supplyChain = {
  constraints: [
    { type: "inventory_exact", precision: "units" },
    { type: "lead_time", maxDays: 30 },
    { type: "quality_threshold", minScore: 0.95 }
  ]
};

// Exact inventory counts. No floating-point discrepancies.

๐Ÿ—๏ธ Technical Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     CONSTRAINT FLOW                             โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                 โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚                   USER INTERFACE                         โ”‚  โ”‚
โ”‚  โ”‚  Spreadsheet โ”‚ Workflow Builder โ”‚ Dashboard โ”‚ CLI       โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                           โ”‚                                     โ”‚
โ”‚                           โ–ผ                                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚                 CONSTRAINT LAYER                         โ”‚  โ”‚
โ”‚  โ”‚                                                          โ”‚  โ”‚
โ”‚  โ”‚  โ€ข Exact Arithmetic (Constraint Theory)                  โ”‚  โ”‚
โ”‚  โ”‚  โ€ข Workflow Invariants                                   โ”‚  โ”‚
โ”‚  โ”‚  โ€ข Routing Constraints                                   โ”‚  โ”‚
โ”‚  โ”‚  โ€ข Compliance Rules                                      โ”‚  โ”‚
โ”‚  โ”‚                                                          โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                           โ”‚                                     โ”‚
โ”‚                           โ–ผ                                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚                   AGENT LAYER                            โ”‚  โ”‚
โ”‚  โ”‚                                                          โ”‚  โ”‚
โ”‚  โ”‚  ๐Ÿ„ Reasoning โ”‚ ๐Ÿฆ† APIs โ”‚ ๐Ÿ Debug โ”‚ ๐Ÿ‘ Consensus       โ”‚  โ”‚
โ”‚  โ”‚  ๐Ÿด Pipelines โ”‚ ๐Ÿฆ… Sync โ”‚ ๐Ÿ” Monitor โ”‚ ๐Ÿ— Hardware      โ”‚  โ”‚
โ”‚  โ”‚                                                          โ”‚  โ”‚
โ”‚  โ”‚  Orchestrated by Border Collie with geometric routing   โ”‚  โ”‚
โ”‚  โ”‚                                                          โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                           โ”‚                                     โ”‚
โ”‚                           โ–ผ                                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚                    DATA LAYER                            โ”‚  โ”‚
โ”‚  โ”‚  Spreadsheet Engine โ”‚ CRDT Memory โ”‚ Exact Snapshots     โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚                                                                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“‹ API Reference

Exact Arithmetic Functions

Constraint Flow uses exact arithmetic powered by constraint-theory-core to eliminate floating-point errors in financial calculations.

// Basic operations - no floating-point drift
CT_ADD(a, b): ExactNumber        // Exact addition: CT_ADD(0.1, 0.2) = 0.3 (exact!)
CT_SUB(a, b): ExactNumber        // Exact subtraction
CT_MUL(a, b): ExactNumber        // Exact multiplication: CT_MUL(0.1, 3) = 0.3 (exact!)
CT_DIV(a, b): ExactNumber        // Exact division with remainder tracking

// Aggregations - zero cumulative error
CT_SUM(range): ExactNumber       // Sum without accumulating errors
CT_AVERAGE(range): ExactNumber   // Precise average
CT_FINANCIAL_SUM(range): ExactNumber  // Regulatory-compliant sum

// Rounding - auditor-approved
CT_ROUND(value, precision): ExactNumber   // Round to specified precision
CT_ROUND_TO_CENTS(value): ExactNumber     // Round to 2 decimal places
CT_ROUND_TO_UNITS(value): ExactNumber     // Round to whole units
CT_ROUND_HALF_EVEN(value, precision): ExactNumber  // Banker's rounding

Why this matters:

// Traditional JavaScript
const total = 0.1 + 0.2;  // 0.30000000000000004 โŒ

// Constraint Flow exact arithmetic
const total = CT_ADD(0.1, 0.2);  // 0.3 EXACTLY โœ“

// Large aggregations
const sum = CT_SUM([0.1, 0.1, 0.1, 0.1, 0.1]);  // 0.5 EXACTLY โœ“
// vs JavaScript: 0.49999999999999994 โŒ

Constraint Types Reference

Type Description Example
amount_limit Maximum value constraint { type: 'amount_limit', max: 10000 }
amount_range Min/max value bounds { type: 'amount_range', min: 100, max: 50000 }
exact_precision Force exact arithmetic { type: 'exact_precision', precision: 'cents' }
time_limit SLA time constraint { type: 'time_limit', maxHours: 24 }
business_hours Only execute 9-5 { type: 'business_hours' }
weekdays_only No weekend execution { type: 'weekdays_only' }
approval_required Always need approval { type: 'approval_required' }
conditional_approval Approval based on condition { type: 'conditional_approval', when: { '>': 5000 } }
multi_approval Multiple approvers needed { type: 'multi_approval', count: 2 }
balanced_workload Distribute work evenly { type: 'balanced_workload' }
no_cycles Prevent circular dependencies { type: 'no_cycles' }
min_parallelism Minimum parallel tasks { type: 'min_parallelism', n: 3 }
max_latency Maximum response time { type: 'max_latency', ms: 5000 }
audit_trail Immutable audit log { type: 'audit_trail', required: true }
hipaa_compliant HIPAA data handling { type: 'hipaa_compliant', required: true }
data_locality Regional data storage { type: 'data_locality', region: 'US' }

Workflow Functions

defineWorkflow(config: WorkflowConfig): Workflow
validateStep(workflow, step): ValidationResult
getConstraintStatus(workflow): ConstraintStatus[]
routeTask(task: Task): AgentAssignment

๐Ÿšข Deployment

Self-Hosted

# Docker
docker run -d -p 3000:3000 constraint-flow/server

# Kubernetes
kubectl apply -f https://constraint-flow.ai/k8s.yaml

# Binary
constraint-flow server --port 3000

Cloud

constraint-flow deploy --provider=aws
constraint-flow deploy --provider=gcp
constraint-flow deploy --provider=azure

๐Ÿ’ผ Enterprise Features

Feature Startup Enterprise
Exact Arithmetic โœ… โœ…
Multi-Agent Routing โœ… โœ…
Workflow Builder โœ… โœ…
SSO/SAML โŒ โœ…
Audit Logs 7 days Forever
SLA Guarantee 99% 99.99%
Support Community Priority
Custom Agents โŒ โœ…
SOC 2 Compliance โŒ โœ…
HIPAA Compliance โŒ โœ…

๐ŸŒŸ Ecosystem

Repo What It Does Key Features
constraint-theory-core ๐Ÿฆ€ Rust crate ~100ns snap, SIMD batch, 82 tests
constraint-theory-python ๐Ÿ Python bindings NumPy integration, PyTorch compatible
constraint-theory-web ๐ŸŒ Interactive demos 50 visualizations, zero setup
constraint-theory-research ๐Ÿ“š Mathematical foundations arXiv paper, proofs, open problems
constraint-ranch ๐ŸŽฎ Gamified learning Puzzle games, agent breeding
constraint-flow ๐Ÿ’ผ This repo Exact financial calculations, workflow orchestration
constraint-theory-agent ๐Ÿค– Implementation agent Code audit, refactoring, expert explanations

Ecosystem Integration

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    CONSTRAINT ECOSYSTEM INTEGRATION                      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                          โ”‚
โ”‚  constraint-theory-core (Rust)                                           โ”‚
โ”‚       โ”‚                                                                  โ”‚
โ”‚       โ”‚ Exact arithmetic, Pythagorean snapping, holonomy checking       โ”‚
โ”‚       โ–ผ                                                                  โ”‚
โ”‚  constraint-theory-python โ—„โ”€โ”€โ”€โ–บ constraint-flow                          โ”‚
โ”‚       โ”‚                            โ”‚                                     โ”‚
โ”‚       โ”‚ PyTorch integration        โ”‚ TypeScript workflows                โ”‚
โ”‚       โ”‚ ML quantization            โ”‚ Business automation                 โ”‚
โ”‚       โ–ผ                            โ–ผ                                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”‚
โ”‚  โ”‚                    constraint-ranch                          โ”‚        โ”‚
โ”‚  โ”‚         Gamified training for constraint-aware agents        โ”‚        โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ”‚
โ”‚                                                                          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Quick Reference

What You Need Where to Go
Exact arithmetic CT_ADD(), CT_SUM() from constraint-theory-core
Agent training constraint-ranch
ML integration constraint-theory-python
Workflow patterns WORKFLOW_PATTERNS.md
Enterprise features ENTERPRISE.md
Ecosystem guide ECOSYSTEM.md

Integration Examples

Using constraint-theory-core from Constraint Flow:

import { PythagoreanManifold, snap } from '@constraint-flow/core';

// These are powered by constraint-theory-core under the hood
const manifold = new PythagoreanManifold(200);
const [exact, noise] = manifold.snap([0.577, 0.816]);
// exact = [0.6, 0.8] = (3/5, 4/5) - EXACT PYTHAGOREAN TRIPLE

๐Ÿค Contributing

Good First Issues ยท CONTRIBUTING.md ยท ONBOARDING.md

Enterprise-grade contributions welcome:

  • ๐Ÿ”Œ Integrations - SAP, Salesforce, QuickBooks
  • ๐ŸŒ Connectors - More data sources
  • ๐Ÿ“Š Reports - Compliance templates
  • ๐ŸŒ Translations - Global business
  • ๐Ÿงช Test Coverage - Edge cases, integration tests
  • ๐Ÿ“š Documentation - Tutorials, API reference

Development Setup

git clone https://github.com/SuperInstance/constraint-flow.git
cd constraint-flow
npm install
npm run build
npm test

๐Ÿ“œ License

MIT โ€” see LICENSE.


Regulatory compliance requires exact arithmetic.

Star this repo ยท Try the platform ยท Read the docs

About

๐Ÿ’ผ Enterprise automation with exact guarantees - constraint-based workflows with multi-agent orchestration

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors