🔬 Discovery Phase: We're exploring what Blocks should be through practical examples.Learn more →
Human-AI Collaboration
with Guardrails
Get started in seconds:
npm install -g @blocksai/cliblocks run my-blockphilosophy:
- "Blog posts must include humor and conversational tone"
- "Resume themes must prioritize readability"
blocks:
# Default domain rules for ALL blocks
domain_rules:
- id: humor_required
description: "Must include wit or light-hearted commentary"
validator.blog_post:
description: "Validates blog content"
# Inherits domain_rules automatically
validators:
- schema # Fast structural checks
- shape.ts # File structure validation
- domain # AI-powered semantic analysisNot Locking Down Code—Giving You a Semantic Compass
Blocks doesn't restrict who can edit code. Instead, it detects when either humans or AI introduce drift from the spec.
Humans Write Code
You're free to modify any block. Write, refactor, experiment—Blocks won't stop you.
AI Agents Write Code
Claude Code (and other AI assistants) can modify blocks too. No restrictions.
Blocks Detects Drift
Run validation. Blocks reports drift and helps you decide: fix code or update spec.
The Validation Loop
Human or AI writes code
Run blocks run <name>
Blocks validates: schema (types), shape (structure), domain (semantics)
Drift detected? You decide: fix code or update spec
Iterate until both code and spec align
Multi-Layer Validation
Catch issues at every level: from schema validation to semantic analysis with AI.
Schema
Fast, deterministic validation of inputs, outputs, and data types using Zod schemas.
Shape
Verify file structure, exports, and conventions to maintain consistent block organization.
Domain
AI-powered semantic analysis that understands your domain concepts and validates against them.
Fully Extensible Validator System
schema, shape, and domain are just the built-in validators we recommend. You can add any number of custom validators, override the defaults, or build your own validation pipeline.
# Mix built-in and custom validatorsvalidators:- schema- domain- name: security_scanrun: "security.audit"- name: perf_checkrun: "perf.benchmark"Live Examples
Explore real-world examples built to discover what Blocks should be. Each example explores different domain patterns.
Resume Themes
Template Rendering
Validates resume themes for semantic HTML, accessibility, and responsive design using DRY domain rules.
Blog Validator
Content Quality
Validates markdown posts for humor and conversational tone using AI-powered semantic analysis.
HR Engine
Production-Ready
Complete recommendation system with scoring, ranking, and filtering. Shows multi-block composition.
Each example helped shape the Blocks specification through practical discovery.
Explore All ExamplesReady to Explore Blocks?
Join the discovery phase. Build examples, shape the spec, and help define what Blocks becomes.