Hold AI-written code accountable

SpecLeft turns declared behaviour into machine-verifiable tests, surfacing missing behaviour before AI-written code reaches production. Offline-first. Zero telemetry. Open Source.

The Problem

Why SpecLeft exists

AI coding agents are good at finishing tasks — and just as good at silently skipping behaviour. CI stays green, tests pass, and missing intent slips into production.

Intent Erosion

When behaviour isn’t explicitly specified, agents fill the gaps with assumptions. Over time, implementation drifts away from what you actually meant.

Green CI, Missing Behaviour

Tests only verify what exists. SpecLeft surfaces behaviour that was declared — but never implemented.

Traceability Pipeline

The lifecycle of a SpecLeft verified feature

Explicit Intent

Define features in markdown-based specs that both humans and LLMs can parse with 100% reliability.

Behavioral Traceability

Establish a verifiable link from behavioral specifications to implementation code and test scenarios.

Gap Analysis

Automatically surface unimplemented behavior or orphaned tests that no longer map to intent.

The Workflow

01.

Define Features

Write behavior specs in Markdown. AI agents use these as constraints.

02.

Define Traceability

Map spec scenarios to implementation tests to establish direct traceability of intent.

03.

Verify Implementation

Run tests to see which parts of the spec are satisfied vs unimplemented.

dev-shell — specleft — 80x24
# 1. View behavioral spec
$ cat auth.spec.md
# Feature: MFA Requirement
# Scenario: Block login without token
# - Status: Implemented
# 2. Run specification check
$ pytest --specleft
PASSED tests/auth/test_login.py::test_mfa_block
UNIMPLEMENTED tests/auth/test_login.py::test_recovery_code
→ spec_id: 2.4.1 [Recovery Logic]
Spec Analysis:
Coverage: 84% implemented
Warning: AI agent modified line 42 without updating spec state.
$

What SpecLeft does not do

No Inference: We never guess intent. It must be explicit in your specification artifacts.

No Auto-Gen: We don't write implementation code for you. We define the boundary.

No SaaS: Everything runs locally or in your private CI. No external APIs used.

No Telemetry: Your code and specs never phone home. Determinism is private.

Quick Install

# Install via Pip
pip install specleft
# Initialize project
specleft init
# Verify Setup Success
specleft doctor
# Check project status
specleft status
# Ready to start planning...

Note: SpecLeft currently supports pytest as the primary test framework. Support for Node.js is exploratory. Please raise an issue in the GitHub Repo if you'd like support for other languages sooner.