🔬 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/cli
blocks run my-block
blocks.yml
philosophy:
  - "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 analysis

Not 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

1.

Human or AI writes code

2.

Run blocks run <name>

3.

Blocks validates: schema (types), shape (structure), domain (semantics)

4.

Drift detected? You decide: fix code or update spec

5.

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 validators
validators:
- schema
- domain
- name: security_scan
run: "security.audit"
- name: perf_check
run: "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.

HandlebarsWCAG
View Example

Blog Validator

Content Quality

Validates markdown posts for humor and conversational tone using AI-powered semantic analysis.

MarkdownTone Analysis
View Example

HR Engine

Production-Ready

Complete recommendation system with scoring, ranking, and filtering. Shows multi-block composition.

ScoringRanking
View Example

Each example helped shape the Blocks specification through practical discovery.

Explore All Examples

Ready to Explore Blocks?

Join the discovery phase. Build examples, shape the spec, and help define what Blocks becomes.