Multi-agent system for automating PUIUX presales and delivery workflows.
node orchestrator.js --client=demo-acme --stage=PS0
node orchestrator.js --client=demo-acme --stage=S2Client fixtures are stored INSIDE this repo at clients/{slug}/:
clients/
├── demo-acme/
│ ├── brief.json
│ └── gates.json
└── demo-retail/
├── brief.json
└── gates.json
brief.json structure:
{
"client": {
"slug": "demo-acme",
"name": "Acme Corporation",
"industry": "E-commerce"
},
"project": {
"title": "Online Store Platform",
"description": "Build a modern e-commerce platform"
},
"requirements": {
"functional": ["Product catalog", "Shopping cart", "Payment"],
"technical": ["Mobile responsive", "SEO friendly"]
},
"constraints": {
"budget": 50000,
"budget_currency": "USD",
"timeline": "12 weeks",
"tech_preferences": ["React", "Node.js"]
},
"goals": {
"target_launch": "2026-05-01",
"expected_users": "10,000/month"
}
}gates.json structure:
{
"payment_verified": false,
"dns_verified": false,
"contract_signed": false,
"proposal_approved": false
}Note: For production clients, link to actual client repos in
client-projects-registry.
All outputs saved to outputs/{client-slug}/{stage}/:
outputs/demo-acme/PS0/
├── presales-agent.json # Structured data
├── presales-agent.md # Human-readable report
└── run.json # Run manifest (SSOT for Dashboard)
run.json includes:
- Run ID, client, stage, status, timestamp
- All artifacts generated
- Gates status snapshot
- Agents executed (name, status, version)
- Metrics (tokens, cost, artifact count)
Open dashboard/web/index.html to view:
- Recent Runs: Latest pipeline executions with status
- Gates Monitor: Payment/DNS/Contract verification status
- System Status: Active agents, total clients, KB files
- Activity Log: Real-time execution events
- orchestrator.js generates
run.jsonafter each execution - generate-dashboard-data.js aggregates all
run.jsonfiles intodashboard/state/metrics.json - Dashboard UI reads
metrics.jsonand auto-refreshes every 30s
node scripts/generate-dashboard-data.jsOutput:
🔍 Scanning for run.json files...
✅ Found 4 runs
✅ Loaded registry: 2 clients
✅ Loaded KB: 9 files
✅ Dashboard data generated
PUIUX Agent Teams integrates with multiple LLM providers:
Supported Providers:
- ✅ OpenAI: GPT-4o, GPT-4o-mini
- ✅ Anthropic: Claude Sonnet, Claude Haiku
- ✅ Gemini: Gemini Pro, Gemini Flash
Features:
- 💰 Cost Tracking: Per-run token usage and cost in
run.json - 🛡️ Budget Enforcement: Configurable limits (per-run, per-stage, per-client)
- 🎯 Smart Routing: Provider selection based on agent type
- 📝 JSON Mode: Structured outputs with schema validation
- 🔄 Retry Logic: Automatic retries with exponential backoff
const ProviderFactory = require('./llm/core/provider-factory');
const factory = new ProviderFactory();
const { provider, model } = factory.getProvider({ category: 'presales', name: 'presales-discovery' });
const result = await provider.generate({
model,
messages: [{ role: 'user', content: 'What is 2+2?' }]
});
console.log(result.text);
console.log(`Cost: $${result.cost}`);| Provider | Model | Input/1M | Output/1M | Best For |
|---|---|---|---|---|
| OpenAI | GPT-4o | $5 | $15 | Complex reasoning |
| OpenAI | GPT-4o-mini | $0.15 | $0.60 | Fast, cheap |
| Anthropic | Claude Sonnet | $3 | $15 | Creative tasks |
| Anthropic | Claude Haiku | $0.25 | $1.25 | Fast, systematic |
| Gemini | Gemini Pro | $1.25 | $5 | Long context |
| Gemini | Gemini Flash | $0.075 | $0.30 | Cheapest option |
- Per project: ~$3 - $6
- Monthly (10 clients): ~$30 - $60
See: llm/README.md for full documentation.
- presales-agent: Discovery → Requirements → Design → Proposal → Contract → Kickoff
- designer-agent: UI/UX, wireframes, mockups
- backend-agent: API, database, architecture
- qa-agent: Test plans, acceptance criteria
- coordinator-agent: Consolidates parallel outputs
orchestrator.js
├── AgentLoader # Load & parse agents
├── GateChecker # Verify gates (payment, DNS)
├── ArtifactChecker # Validate deliverables exist
├── SecureLogger # Auto-redact secrets
└── Orchestrator # Execute stages
✅ Artifact Integrity: All deliverables validated for existence
✅ Derived Calculations: Zero magic numbers - all metrics calculated from real data
✅ Conflict Detection: Tech stack mismatches, coverage gaps, invalid endpoints
✅ QA Test Generation: Extracts endpoints from api-spec.md, screens from wireframes-notes.md
✅ Action Items: Auto-generated from conflicts and issues
✅ Robust Parsing: JSON markers prevent false positives
presales-agent → outputs
designer-agent ┐
├→ outputs (parallel)
backend-agent ┘
- Create
agents/{category}/{name}-agent.md:
---
name: my-agent
description: What it does
stage: PS0|S2|etc
tools: [Read, Write]
model: sonnet
---
# Agent content following AGENT_SPEC.md-
Update
orchestrator.jsstage mapping -
Test:
node orchestrator.js --client=demo-acme --stage=YOUR_STAGE
Run complete pipelines (all stages at once):
# Run full delivery pipeline (S2 → S3)
node pipeline-runner.js --client=demo-acme --pipeline=delivery
# Run full presales pipeline (PS0 → PS5)
node pipeline-runner.js --client=demo-acme --pipeline=presalesOutput:
╔═══════════════════════════════════════════╗
║ PUIUX Pipeline Runner - DELIVERY ║
╚═══════════════════════════════════════════╝
Client: demo-acme
Stages: S2 → S3
🚀 Running S2...
✅ S2 completed successfully
🚀 Running S3...
✅ S3 completed successfully
Total: 2/2 stages completed
✅ Pipeline completed successfully!
# Test single stage
node orchestrator.js --client=demo-acme --stage=PS0
node orchestrator.js --client=demo-acme --stage=S2
# Test full pipeline
node pipeline-runner.js --client=demo-acme --pipeline=delivery
node pipeline-runner.js --client=demo-retail --pipeline=delivery
# Verify outputs
ls -la outputs/demo-acme/S2/
cat outputs/demo-acme/S2/coordinator-agent.md
jq '.result.consolidated' outputs/demo-acme/S2/coordinator-agent.json- ✅ Auto-redacts secrets in logs
- ✅
outputs/excluded from git - ✅ No credentials in codebase
- ✅ Follows SECURITY.md guidelines
All agents follow AGENT_SPEC.md:
- Standard inputs/outputs
- 5-phase workflow
- Quality gates
- Error handling
Proprietary - PUIUX © 2026