Self-Learning AI Harness

Give your AI
real discipline.
Not vibes.

Neural Lace wraps Claude Code, Cursor, Codex, and Gemini with mechanically-enforced best practices, risk-based permissions, and progressive autonomy — so your AI coding tools inherit years of engineering discipline by default.

Explore Architecture
25+
Encoded Practices
4
AI Tool Adapters
6
Risk Dimensions
Scroll
Risk-Based Permissions
Progressive Autonomy
Pre-Commit Security Scanning
Evidence-First Completion
Self-Evaluation Engine
Two-Layer Config Hygiene
Trust Accumulation
Anti-Vaporware Enforcement
Tool-Call Budget Discipline
Decision Record Atomicity
Risk-Based Permissions
Progressive Autonomy
Pre-Commit Security Scanning
Evidence-First Completion
Self-Evaluation Engine
Two-Layer Config Hygiene
Trust Accumulation
Anti-Vaporware Enforcement
Tool-Call Budget Discipline
Decision Record Atomicity

Four layers.
One coherent system.

Universal principles at the core. Abstract patterns in the middle. Thin, swappable adapters at the edge. Your project context at the top. Each layer changes at a different cadence — tool changes never break your principles.

L0 Principles principles/
Universal values, risk model, autonomy ladder. Changes rarely. Tool-agnostic.
L1 Patterns patterns/
Rules, hooks, agents, risk profiles, templates. Changes occasionally. Tool-agnostic.
L2 Adapters adapters/
Claude Code, Codex, Cursor, Gemini. Thin wrappers per tool version.
L3 Project per-repo
Per-repo rules, audience, context. Changes per project. Lives alongside your code.

Discipline that's
mechanically enforced.

Not guidelines. Not suggestions. Hooks, gates, and scanners that block anti-patterns before they ship — whether you're coding alone or in a team with AI assistance.

Risk-Based Permissions
Actions scored across 6 dimensions: reversibility, blast radius, sensitivity, authority escalation, novelty, velocity. No brittle pattern matching.
Progressive Autonomy
Trust accumulates (0.0–1.0) through safe operation. The AI asks less and does more as reliability is demonstrated — hard blocks never relax.
Evidence-First Completion
Plan checkboxes can only be flipped by the task-verifier agent, never by self-report. A hook enforces this mechanically. "Code exists" isn't done.
Self-Evaluation
A weekly /harness-review skill audits the harness itself — dead doc links, stale references, drift between installed and source copies.
Two-Layer Config
Shareable harness code never contains identity, credentials, or paths. Personal config lives in ~/.claude/local/ — gitignored, machine-local.
Defense in Depth
Credentials scanned at commit AND push time. 18+ pattern families. AI cannot use --no-verify without explicit user authorization in Claude Code sessions.

Six dimensions.
Four tiers. Zero guessing.

Every action scored before execution. Unknown actions handled gracefully. No brittle string matching — structural risk assessment that survives tool updates.

0 — 4
Reversibility
0 — 4
Blast Radius
0 — 4
Sensitivity
0 — 4
Authority Escalation
0 — 4
Novelty
0 — 4
Velocity
Tier Score Response
T0 0 — 1 Execute immediately
T1 1 — 2.5 Execute, log prominently
T2 2.5 — 4 Pause, show risk, wait
T3 4+ Block. Explain why.

Three commands.
Fully installed.

Deploys rules, agents, hooks, and templates to ~/.claude/ and sets up global git hooks for security scanning on every repo on your machine.

# Clone the harness
cd ~/claude-projects
git clone github.com/mishanovini/neural-lace

# Navigate to Claude Code adapter
cd neural-lace/adapters/claude-code
chmod +x install.sh

# Install globally
./install.sh
Claude Code v1.0 Live
Cursor Planned v1.5
Codex Planned v1.5
Gemini CLI Planned v2.0

Encoded discipline.
Not aspiration.

25+
01
CLAUDE.md Under 200 Lines
Keep it an index, not a book. The adapter's CLAUDE.md is the model — a lean pointer to deeper docs, not a wall of text.
02
Tool-Call Budget Discipline
After every 30 Edit/Write/Bash calls, the harness blocks further work until a plan-evidence-reviewer audit runs.
03
Decision Records Are Atomic
Every decisions/NNN-*.md must be staged alongside DECISIONS.md in the same commit. Hook-enforced. No orphaned decisions.
04
Orchestrator Pattern
Main session dispatches build work to sub-agents. Stays lean as an orchestrator. Documented in rules/orchestrator-pattern.md.
05
Anti-Vaporware Enforcement
Runtime features require a replayable runtime-verification command. "The code exists" is not done. Mechanically blocked.
06
Safe Automation Default
review-before-deploy pauses before git push, gh pr merge, supabase db push. Users opt IN to full-auto. Safe by default.

Your AI tools deserve
real guardrails.

MIT licensed. Free to use, fork, and modify. Contributions welcome.

Published with PageSumo