CDALVibecoding Manual
For vibecoding enthusiasts, solopreneurs & lean teams

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

Runtime

Node.js 20+ & Git

Installed Node.js LTS (v20 or v22) and an initialized git repository.

node -v && git status
AI IDE

Cursor / Windsurf / Antigravity / Claude

Cursor Composer Agent, Windsurf Cascade, Claude Code, or VS Code with Cline.

Model: Claude 3.7 / 3.5 Sonnet
Core Rule

No Untamed Agents

AI must be prevented from editing tests to disguise implementation flaws.

exit 2 PreToolUse & Gate

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 init

Step 2: Add core packages to dev dependencies:

pnpm add -D @cdal/cli @cdal/core# or: npm install -D @cdal/cli @cdal/core

Step 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

File: .cursorrules / AGENTS.md / .windsurfrulesUTF-8 Markdown
# 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

Step 1 (PLAN & RED)

“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.”

Step 2 (GREEN)

“Test is red. Implement production code in src/cart.ts to make the test pass green. Do NOT modify the test file.”

Step 3 (VERIFY)

“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:

Hi! In this project we work strictly under the CDAL (Contract-Driven Agentic Loop) methodology. Our hard rules: 1. Every change begins with a requirement REQ-XXX and a contract in contracts/. 2. First, write a failing test tagged with // @REQ: REQ-XXX. 3. Next, write production code. Never touch or weaken test files to hide bugs. 4. Zero @ts-ignore, zero `as any`, zero linter suppressions. 5. Finally, we execute `npx cdalkit verify`. Confirm you understand these rules and ask me for the first REQ-* requirement.

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.