AI-Native Declarative Platform for building autonomous B2B applications with causal reasoning, verification loops, and production-ready safety rails.
- Python CLI -
pip install -e .βreclappcommand - Full Lifecycle - Single command: prompt β contract β code β service β tests
- Contract AI 2.2 - 3-layer specification (Definition, Generation, Validation)
- 8-Stage Validation - Syntax, Schema, Assertions, Static Analysis, Tests, Quality, Security, Runtime
- Pydantic Contracts - Python-first contract definitions
- Auto-fix - Automatic package.json and tsconfig.json fixes
- Node.js 18+
- Docker & Docker Compose (optional)
- npm or yarn
# Clone repository
git clone https://github.com/wronai/contract.git
cd contract
# If npm is not available in your shell (e.g. non-interactive/CI), load NVM first:
source ~/.nvm/nvm.sh
# Install Node.js dependencies
npm install
# Install Python CLI (recommended)
pip install -e .
# Or with venv
python3 -m venv venv
source venv/bin/activate
pip install -e .# After pip install -e .
reclapp --version # Show version
reclapp --help # Show help
reclapp --prompt "Create a notes app" # Full lifecycle
reclapp prompts # Show example prompts
reclapp validate # Validate Pydantic contracts# Analyze existing codebase
./bin/reclapp analyze ./src
# Refactor from GitHub (clone + analyze + generate contract)
./bin/reclapp refactor https://github.com/user/repo
# Refactor local directory
./bin/reclapp refactor ./my-project
# Output: refactoring_contract.json, analysis_report.md, todo_list.md# Generate full application from prompt
./bin/reclapp evolve -p "Create a todo app" -o ./output2
# With CI/CD and Docker
./bin/reclapp evolve -p "Create a blog with cicd and docker" -o ./output
# Keep running (watch mode)
./bin/reclapp evolve -p "Create an inventory app" -o ./output -k# From prompt - generates contract, code, validates, and tests
./bin/reclapp-full-lifecycle.sh --prompt "Create a notes app"
# From contract file
./bin/reclapp-full-lifecycle.sh examples/contract-ai/crm-contract.ts
# With options
./bin/reclapp-full-lifecycle.sh --prompt "Create a CRM" -o ./my-app --port 4000# Generate from prompt
./bin/reclapp generate-ai --prompt "Create a todo app with tasks"
# Generate from contract
./bin/reclapp generate-ai examples/contract-ai/crm-contract.ts -o ./generated# List available contracts
reclapp list
# Generate full application from contract
reclapp generate examples/crm/contracts/main.reclapp.ts
# Or generate and run development servers
reclapp dev examples/crm/contracts/main.reclapp.ts# After generation, start the servers
cd examples/crm/target/api && npm install && npm run dev # API on :8080
cd examples/crm/target/frontend && npm install && npm run dev # UI on :3000# Start Docker services (with auto-diagnostics)
make auto-up
# Or use standard commands
make up # Start services
make logs # View logs
make down # Stop services
# Run tests
make testData Source: Example apps typically use JSON fixtures under data/ and the modules/data-provider module.
reclapp/
βββ bin/ # CLI Tools
β βββ reclapp # Main Node.js CLI (analyze, refactor, evolve)
β
βββ src/core/contract-ai/ # Contract AI Core
β βββ analysis/ # Code analysis & refactoring
β β βββ code-analyzer.ts # Multi-language parser (9 languages)
β β βββ refactoring-contract.ts # Contract generator
β βββ evolution/ # Evolution pipeline
β β βββ evolution-manager.ts # Main orchestrator
β β βββ task-handlers.ts # Task handlers
β β βββ llm-orchestrator.ts # LLM integration
β βββ types/ # 3-Layer types
β βββ generator/ # Contract generator
β βββ validation/ # 8-stage validation pipeline
β
βββ examples/
β βββ prompts/ # Example prompts (10 files)
β βββ contract-ai/ # TypeScript contracts
β βββ pydantic-contracts/ # Python contracts
β
βββ pyproject.toml # Python package config
βββ package.json # Node.js dependencies
βββ AGENTS.md # Agent specification
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Layer 1: DEFINITION β app, entities, api β
β Layer 2: GENERATION β instructions, techStack β
β Layer 3: VALIDATION β assertions, tests, acceptanceβ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
PROMPT β CONTRACT β CODE β VALIDATE β SERVICE β TESTS
(LLM) (LLM) (8 stages) (Express) (CRUD)
# Simple prompts
reclapp --prompt "Create a notes app"
reclapp --prompt "Create a todo app with tasks"
reclapp --prompt "Create a CRM with contacts and deals"
# From prompt files (more detailed)
reclapp --prompt "$(cat examples/prompts/01-notes-app.txt)"
reclapp --prompt "$(cat examples/prompts/03-contacts-crm.txt)" -o ./my-crm
# Or use the helper script
./bin/reclapp-from-prompt.sh examples/prompts/02-todo-app.txt| Prompt | Description |
|---|---|
01-notes-app.txt |
Simple notes with CRUD |
02-todo-app.txt |
Tasks with priorities and categories |
03-contacts-crm.txt |
CRM with contacts, companies, deals |
04-inventory.txt |
Stock management system |
05-booking.txt |
Reservation system |
06-blog.txt |
Blog with posts and comments |
07-hr-system.txt |
Employee management |
08-invoices.txt |
Invoice system |
09-support-tickets.txt |
Support ticket system |
10-events.txt |
Event registration |
| Contract | File |
|---|---|
| CRM | examples/contract-ai/crm-contract.ts |
| Notes | examples/pydantic-contracts/contracts.py |
| Todo | examples/full-lifecycle/02-todo-app.ts |
| Component | Status |
|---|---|
Python CLI (reclapp) |
β Working |
Shell CLI (reclapp-full-lifecycle.sh) |
β Working |
| 8-Stage Validation | β All Passing |
| Service Health Check | β Working |
| CRUD Endpoint Tests | β 2/2 Passing |
# Install Python CLI
pip install -e .
# Run full lifecycle
reclapp --prompt "Create a todo app with tasks"
# Or use shell script
./bin/reclapp-full-lifecycle.sh --prompt "Create a notes app"βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β RECLAPP 2.2.0 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β INPUT β
β βββ Prompt ("Create a CRM system") β
β βββ TypeScript Contract (*.ts) β
β βββ Pydantic Contract (Python) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β CONTRACT AI (3 Layers) β
β βββ Definition (app, entities, api) β
β βββ Generation (instructions, techStack) β
β βββ Validation (assertions, tests, acceptance) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β VALIDATION PIPELINE (8 Stages) β
β βββ 1. Syntax 5. Tests β
β βββ 2. Schema 6. Quality β
β βββ 3. Assertions 7. Security β
β βββ 4. Static 8. Runtime β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β OUTPUT β
β βββ Generated API (Express.js + TypeScript) β
β βββ Health Check (/health) β
β βββ CRUD Endpoints (/api/v1/items) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Document | Description |
|---|---|
| Project Status | Current status |
| Testing Guide | Testing procedures |
| LLM Configuration | Multi-provider LLM setup and routing |
| AGENTS.md | Agent specification |
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open Pull Request
Apache 2 License - see LICENSE for details.
Reclapp - AI-Native Declarative Platform for Autonomous B2B Applications
Made with β€οΈ by Softreck
