Vibecoding without regressions.
Setup & Installation in 60 seconds.
Write code with AI in Cursor, Windsurf, Antigravity or Claude Code at full speed. CDAL acts as your deterministic seatbelt: physically barring models from tampering with tests, hallucinating APIs, or suppressing types.
1. What You Need to Prepare
Quick checklist of runtime prerequisites
Node.js 20+ & Git
Installed Node.js LTS (v20 or v22) and an initialized git repository.
Cursor / Windsurf / Antigravity / Claude
Cursor Composer Agent, Windsurf Cascade, Claude Code, or VS Code with Cline.
No Untamed Agents
AI must be prevented from editing tests to disguise implementation flaws.
2. 60-Second Installation
One command that generates contract scaffold and guardrail hooks
Step 1: Run the initializer in your project root:
npx @cdal/cli initStep 2: Add core packages to dev dependencies:
pnpm add -D @cdal/cli @cdal/core# or: npm install -D @cdal/cli @cdal/coreStep 3: Mutation-test your safety gates locally:
npx cdalkit selftest✔ Every quality gate rule is verified active and firing.3. Configuring Your AI Editor
Drop these rules into your repo so agents obey CDAL discipline automatically
# CDAL Rules for AI Assistant (Agent Mode) You are an engineering assistant operating in the CDAL (Contract-Driven Agentic Loop) framework. Absolute rules you MUST NEVER violate under any circumstances: 1. RED PHASE: When asked for tests, write ONLY test files in the test directory. Every test MUST include the comment: // @REQ: REQ-XXX Run the test suite and ensure it fails with an error (FAIL). 2. GREEN PHASE: When asked for implementation, modify ONLY production code in `src/`. You are CATEGORICALLY FORBIDDEN from modifying test files or loosening assertions. Never use: @ts-ignore, @ts-expect-error, or "as any". 3. CONTRACTS: Business invariants live in `contracts/*.contract.mjs`. Never modify a contract unless the user explicitly opens a contract window. 4. VERIFICATION: Before completing your task, run `npx cdalkit verify`.
4. Daily Vibecoding Loop (3 Prompts)
How to prompt the model to ensure 100% bug-free delivery
“Add shopping cart feature [REQ-CART-01]. First write a failing test in tests/cart.test.ts tagged with // @REQ: REQ-CART-01 and verify it fails RED.”
“Test is red. Implement production code in src/cart.ts to make the test pass green. Do NOT modify the test file.”
“Run `npx cdalkit verify` and confirm all contracts, types, and tests pass deterministically.”
5. Kickoff Session Prompt
Paste this at the start of any new session in your AI assistant:
Start safe vibecoding today
Free offline repo audit or instant Pro package checkout. No sales calls — just install and build with AI with total peace of mind.