outcome-cli
v1.0.0
Published
An AI-assisted coding tool where you define outcomes and pay only for verified code
Maintainers
Readme
Outcome
An AI-assisted coding tool where you define outcomes (not prompts) and multiple agents race to deliver verified, working code. Pay only when code passes your criteria.
Table of Contents
What is Outcome?
Outcome is a developer tool that revolutionizes code generation by focusing on verifiable outcomes rather than AI prompts. Define what success looks like (e.g., "Add JWT authentication with passing tests and <200ms response time"), and multiple AI agents compete to deliver working code that meets your exact criteria. You only pay for code that passes verification.
Differentiation from Traditional AI Coding Tools
| Feature | Cursor/Windsurf | Outcome | |---------|-----------------|---------| | Input | Manual prompts | Outcome definitions | | Selection | Human judgment | Deterministic verification | | Payment | Subscription | Pay-only-on-success | | Verification | Manual testing | Automated criteria | | Focus | Code generation | Guaranteed delivery |
Key Features
- Outcome-Based Development: Define success criteria upfront, not just prompts
- Multi-Agent Competition: Multiple AI models (GPT-4o, Claude, Gemini) race to deliver
- Deterministic Verification: Automated testing ensures code meets your standards
- Pay-on-Success: Only pay when code passes all verification criteria
- Domain-Adaptive Weighted Scoring (DAWS): Proprietary multi-metric evaluation system
- CLI-First Design: Simple command-line interface for developers
- BYOK Support: Bring your own API keys for full control
Installation
Install from npm (Recommended)
npm install -g outcome-cliThis installs the Outcome CLI globally, making the outcome command available system-wide.
Prerequisites
- Node.js 18+
- At least one API key (OpenAI, Anthropic, or Google Gemini)
Configuration
After installation, create a .env file in your project directory or set environment variables:
# Create .env file
echo "OPENAI_API_KEY=sk-proj-your-key-here" > .env
echo "ANTHROPIC_API_KEY=sk-ant-api03-your-key-here" >> .env
echo "GOOGLE_API_KEY=AIzaSy-your-key-here" >> .envOr set environment variables directly in your shell.
Quick Start
Get Outcome running and generate your first verified code feature in under 5 minutes.
1. Define an Outcome
# Define an authentication feature outcome
outcome define auth-feature \
--description "Add JWT user authentication with password hashing" \
--criteria tests-pass,lint-clean,builds-successfully \
--max-attempts 32. Run the Competition
# Multiple agents compete to deliver
outcome run auth-feature \
--models gpt-4o,claude-sonnet \
--live3. Verify Results
# Deterministic verification
outcome verify auth-feature
# Expected output:
# ✅ Outcome 'auth-feature' PASSED
# 🔍 Criteria met: tests-pass, lint-clean, builds-successfully
# 💰 Cost: $2.50 (only if all criteria passed)Usage
CLI Commands
Define an Outcome
outcome define <name> [options]
Options:
--description <text> Description of the outcome
--criteria <list> Comma-separated verification criteria
Available: tests-pass, lint-clean, builds-successfully,
security-scan, benchmark-passes
--max-attempts <number> Maximum attempts per agent (default: 3)
--timeout <ms> Timeout per attempt (default: 300000)
--budget <amount> Maximum cost per outcome (default: 10.00)Run an Outcome
outcome run <name> [options]
Options:
--models <list> Comma-separated models to use
Available: gpt-4o, claude-sonnet, claude-opus,
gemini-pro, gemini-flash
--live Show real-time progress
--parallel <number> Number of agents to run in parallel (default: 3)Verify an Outcome
outcome verify <name>
# Shows detailed verification results including:
# - Which criteria passed/failed
# - Test output
# - Build status
# - Performance benchmarksList Outcomes
outcome list
# Shows all defined outcomes with statusExample: Add User Registration
# Define the outcome
outcome define user-registration \
--description "Implement user registration with email verification" \
--criteria tests-pass,lint-clean,builds-successfully,security-scan \
--max-attempts 5
# Run with multiple models
outcome run user-registration \
--models gpt-4o,claude-sonnet,gemini-pro \
--live
# Verify the result
outcome verify user-registrationVerification Criteria
- tests-pass: All unit tests pass (Jest, Vitest, etc.)
- lint-clean: Code passes linting (ESLint, Prettier)
- builds-successfully: Project builds without errors
- security-scan: Passes security analysis
- benchmark-passes: Meets performance benchmarks
Architecture
outcome-cli/
├── src/
│ ├── outcomes/ # Outcome definitions and management
│ ├── eval/ # Core evaluation engine
│ │ ├── evaluateOutcome.ts # Binary evaluation logic
│ │ ├── validators.ts # Verification functions
│ │ ├── ai-judge.ts # LLM-as-judge system
│ │ └── weighted-scorer.ts # DAWS scoring system
│ ├── runtime/ # Multi-model adapters
│ │ ├── openai-adapter.ts
│ │ ├── anthropic-adapter.ts
│ │ └── google-adapter.ts
│ ├── agents/ # Agent configurations
│ └── commands/ # CLI command handlers
│ ├── define.ts
│ ├── run.ts
│ └── verify.tsCore Components
- Binary Evaluation Engine: Deterministic pass/fail verification
- AI Judge System: LLM-based code quality assessment with caching
- Validator Framework: Extensible validation functions
- Weighted Scoring System: Multi-metric performance evaluation
- Multi-Model Runtime: Unified interface across AI providers
Contributing
We welcome contributions! Areas of focus:
- New verification criteria
- Additional AI model support
- Performance optimizations
- Documentation improvements
- Test coverage
Development Setup
# Install dependencies
npm install
# Run tests
npm test
# Run linting
npm run lint
# Build the project
npm run buildAdding a New Validator
- Create a validator function in
src/eval/validators.ts - Export it from the validators module
- Add it to the CLI criteria options
- Update documentation
License
ISC License - see LICENSE file for details.
Contact
- GitHub Issues: Report bugs or request features
- Documentation: See docs/ for detailed guides
Built for developers who demand working code, not just suggestions.
Outcome - Pay only for code that works.
