Open Source · Claude Code Plugin · MIT License

JuhBDI

Intent-Driven Autonomous Development Engine

An enterprise-grade AI development harness built on the BDI cognitive model. You define intent. JuhBDI challenges it, plans it, executes it in governed parallel waves, and learns from every outcome.

View on GitHub See How It Works

Install

One command. Works globally across all your projects.

npm (all platforms)
$ npx juhbdi@latest
or install with the platform-specific script below
macOS
# Install globally with one command
$ curl -fsSL https://www.juhlabs.com/juhbdi/install.sh | bash -s -- --global
# Or download and run interactively
$ curl -fsSL https://www.juhlabs.com/juhbdi/install.sh -o install.sh && bash install.sh
Requires Node.js, Git, and Claude Code CLI. Bun auto-installs if missing.
Linux (Ubuntu/Debian/Fedora/Arch)
# Ensure prerequisites are installed
$ sudo apt install -y nodejs npm git # Debian/Ubuntu
# Install JuhBDI globally
$ curl -fsSL https://www.juhlabs.com/juhbdi/install.sh | bash -s -- --global
# If CLI not on PATH after install, add ~/.local/bin
$ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
Requires Node.js, Git, and Claude Code CLI. Bun auto-installs if missing. Works on Ubuntu, Debian, Fedora, Arch, and WSL2.
Windows (WSL2)
# Step 1: Install WSL2 (PowerShell as Admin)
PS> wsl --install
# Step 2: Open WSL2 terminal (Ubuntu) and install prerequisites
$ sudo apt install -y nodejs npm git
# Step 3: Install JuhBDI
$ curl -fsSL https://www.juhlabs.com/juhbdi/install.sh | bash -s -- --global
Requires WSL2 with Ubuntu. Claude Code runs inside WSL2, not native Windows.

The Problem with AI-Assisted Development

AI coding tools are powerful, but they lack structure. Without governance, traceability, and memory, you get speed without trust.

No Audit Trail

Most AI tools generate code with no record of why decisions were made, what alternatives were considered, or what constraints were applied. When something breaks, you're debugging a black box.

No Intent Verification

AI happily implements whatever you ask, even if it contradicts your project goals or violates constraints you've already defined. There's no Socratic challenge, no sanity check.

No Learning Across Sessions

Every conversation starts from zero. The same mistakes repeat. Successful approaches aren't remembered. Cost-effective model tiers aren't learned. Context resets destroy institutional knowledge.

No Cost Intelligence

Most tools route everything through the most expensive model. A simple rename doesn't need the same compute as an architecture refactor, but the bill doesn't know the difference.

How It Works

Every development request flows through a governed five-stage pipeline. Nothing executes without challenge. Everything leaves a trail.

Intent Define goals, constraints, tradeoff weights
Challenge Socratic validation against all constraints
Plan Wave decomposition with receding horizon
Execute Isolated agents with automatic recovery
Learn Principles, trust updates, memory recording

1. Intent Specification

Define your project as structured goals with measurable targets, hard/soft constraints, tradeoff weights (quality vs speed vs security), and human-in-the-loop gates. This is your source of truth.

2. Socratic Challenge

Every request is evaluated against every constraint. Hard violations block execution. Soft conflicts generate warnings. Overrides are logged with reasoning. Nothing slips through unchecked.

3. Wave Planning

Tasks are decomposed into waves using receding-horizon planning: only the next wave is fully specified. After execution, beliefs update and the next wave is replanned with fresh context.

4. Governed Execution

Each task runs in an isolated git worktree with intent verification, HITL gate checks, and governance validation. Failures trigger automatic diagnostician + strategist recovery.

5. Reflection & Learning

Post-execution, principles are extracted from plan-vs-actual divergence. Trust scores update. Successful approaches are recorded for future pre-task speculation. Every run makes the next one better.

BDI Architecture

Built on the Belief-Desire-Intention cognitive model from agent theory. Not a prompt wrapper — a thinking architecture.

Beliefs State + Memory Desires Goals + Intent Intentions Plans + Tasks Memory A-MEM Govern HITL Gates Routing 5-Signal Audit SHA-256

Beliefs

The system's understanding of the world: project state, compressed history, codebase structure (PageRank-weighted repo map), and cross-linked memory from past executions. Updated after every wave.

Desires

What you want: structured goals with measurable targets, weighted constraints, and tradeoff preferences. These never change during execution unless you explicitly update them.

Intentions

The committed execution plan: atomic tasks organized into waves, each with verification commands, goal alignment, and model tier routing. Replanned after every wave based on updated beliefs.

Core Capabilities

Every feature exists because unstructured AI development fails in predictable ways. These are the structural answers.

Intelligent Model Routing

5-signal algorithm evaluates override, memory match, structural complexity, tradeoff bias, and failure escalation for every task. Trust scoring learns which tiers actually work, so you stop overpaying for simple tasks.

Tamper-Evident Audit Trail

Every decision is logged with SHA-256 chaining: what was decided, why, what alternatives were considered, which constraints applied. Designed with enterprise compliance and EU AI Act traceability in mind.

Wave-Based Execution

Tasks decompose into parallel waves. Each runs in an isolated git worktree. On failure, a diagnostician agent identifies root cause and a strategist agent proposes a new approach — automatic recovery without human intervention.

Cross-Linked Memory

A-MEM records every execution as a cross-linked triplet. Before each task, the system speculates on approaches from past experience and surfaces principles extracted from plan-vs-actual divergence. Knowledge compounds.

Governance Framework

Human-in-the-loop gates for sensitive operations. Destructive command blocking. Constraint enforcement at every step. Intent verification runs before each task — if a task doesn't serve a stated goal, it doesn't execute.

Auto-Triggering

A rules engine scores natural language prompts against pattern categories. When confidence exceeds threshold, JuhBDI suggests the appropriate command. You don't need to remember the commands — it meets you where you are.

Benchmarks

Real numbers from JuhBDI's own test suite and internal benchmarks. No synthetic demos, no cherry-picked runs.

Test Suite

Total tests 820
Failures 0
Test files 83
Assertions 1,562
Full suite runtime ~650ms
Growth from v1.4.1 +22%

Latency

Auto-trigger scoring 0.01ms / msg
Trust scoring <0.001ms / record
Difficulty estimation 0.001ms / task
Principle extraction 0.03ms / wave

Model Routing (50 tasks)

Cost-safe routing ~90%
Savings vs all-opus baseline 80%
Correct tier selection 40%
Conservative (overkill) ~50%

Capability Coverage

Capabilities implemented 39
Unique to JuhBDI 26
Zero competitors have 12
Milestones completed 11
Competitors evaluated 7

Benchmarks from M11 "Intelligence Engine + Enterprise Governance + Developer Experience" release (v1.5.0). Test growth: 670 → 820 (+22%). New capabilities: reflexion memory, EU AI Act compliance, tiered autonomy, verifier chain, BDI dashboard, observation masking. Routing accuracy measured across 50 synthetic tasks with known optimal tiers. Capability comparison based on feature matrix evaluated across 7 competing tools. Full methodology available in the repository.

0
Tests
0
Modules
0
Commands
0
Agents
0
Capabilities
0
Milestones
Installs
Stars
+
JuhBDI

OpenClaw + JuhBDI

Give your OpenClaw agents enterprise-grade governance. Intent verification, SHA-256 audit trails, learning memory, and trust scoring — works with any LLM.

Intent Verification

Agents challenge vague or risky requests before executing. Destructive actions flagged automatically. No more blind execution.

Audit Trail

Every decision logged with SHA-256 hash chains. Tamper-evident, verifiable, compliant. Know exactly why your agent did what it did.

Learning Memory

Agents learn from past tasks. Successful approaches recalled. Failed approaches avoided. Principles extracted and applied automatically.

Trust Scoring

Track model reliability across tasks. Trust builds with successful completions. Low-trust models flagged before they run critical work.

OpenClaw
# Install the BDI governance plugin
$ openclaw plugins install @juhlabs/openclaw-bdi
# Or via npm
$ npm install @juhlabs/openclaw-bdi
# Your agent now has 5 governance tools:
bdi_verify_intent — Challenge risky actions before execution
bdi_recall — Retrieve past experiences & learned principles
bdi_log_decision — SHA-256 hash-chained audit trail
bdi_reflect — Extract principles from outcomes
bdi_assess — Estimate difficulty & model trust
# + automatic governance injection & audit hooks
BDI governance layer loaded. Works with Claude, GPT, Gemini, DeepSeek.

Compatible with all 13,700+ OpenClaw skills. Makes every skill smarter with governance, memory, and learning.

Documentation

Everything you need to understand JuhBDI's architecture, commands, and cognitive model.

Slash Commands

Command Description
/juhbdi:initInitialize project — scans codebase, asks about goals, creates governance config
/juhbdi:planInteractive planning — discovers intent, analyzes code, generates wave-based roadmap
/juhbdi:executeGoverned execution loop with parallel worktrees, model routing, and auto-recovery
/juhbdi:quickFast-track simple tasks (skips full planning, keeps governance)
/juhbdi:statusDashboard: progress, routing stats, cost intelligence, context health
/juhbdi:costCost analysis: per-task spend, savings vs always-opus, tier distribution
/juhbdi:trailQuery the SHA-256 chained audit trail
/juhbdi:auditVerify decision trail integrity (tamper detection)
/juhbdi:reflectExtract learned principles from plan-vs-actual divergence
/juhbdi:pausePause execution with full context handoff
/juhbdi:resumeResume from handoff in a new session
/juhbdi:validateValidate roadmap structure and intent alignment
/juhbdi:activateInject JuhBDI activation into CLAUDE.md

Get Started

Four commands. From intent to governed, tested, auditable code with a learning loop that compounds across every session.

# Initialize governance files (intent-spec, state, trail, config)
$ /juhbdi:init
Project initialized. 5 governance files created in .juhbdi/
Edit .juhbdi/intent-spec.json to define your goals and constraints.
# Submit a development request through the Socratic pipeline
$ /juhbdi:plan Build a REST API with auth
Socratic challenge: approved (0 hard conflicts)
Refined request: "REST API with JWT auth, rate limiting, and input validation"
Generated 3 waves, 7 tasks. Roadmap written to .juhbdi/roadmap-intent.json
# Execute with isolated agents, model routing, and automatic recovery
$ /juhbdi:execute
Executing 7 tasks across 3 waves to achieve:
Goal g1: "Implement REST API with authentication" (weight: 0.9)
Wave 1/3 [====] 3/3 tasks passed | routed: haiku x2, sonnet x1
Wave 2/3 [====] 2/2 tasks passed | routed: sonnet x2
Wave 3/3 [====] 2/2 tasks passed | routed: sonnet x1, haiku x1
7 passed, 0 failed. Memory: 7 experiences recorded.
Trust updated: sonnet 0.92, haiku 0.88
# Extract principles from what went differently than planned
$ /juhbdi:reflect
Extracted 2 principles from execution divergence:
P1: "Validate auth middleware before route handlers"
P2: "Schema-first approach prevents integration failures"
Principles stored. Will be injected into future matching tasks.

What We're Building Toward

Intuition doesn't scale. Systems do.

JuhBDI started from a simple observation: AI coding tools are getting faster, but not more trustworthy. You can generate thousands of lines of code in minutes, but you can't explain why any particular decision was made. You can't audit it. You can't prove it respects the constraints your team agreed on.

We think autonomous development needs the same rigor that autonomous vehicles needed. Not just "does it work?" but "can you prove it works, explain why it works, and show it won't break what was already working?"

The BDI model gives us that structure. Beliefs maintain state and memory. Desires hold your goals as immutable contracts. Intentions are the executable plans that get challenged, verified, and audited at every step. When something goes wrong, the trail shows exactly what happened and why.

This is version 1.5.0, the result of 11 milestones of iterative development. Every feature was built using JuhBDI's own pipeline (yes, it builds itself). v1.5.0 adds reflexion memory (learns from failures), EU AI Act compliance, tiered autonomy, a deterministic verifier chain, and a live BDI dashboard — 12 capabilities that zero competitors have. The core architecture is stable, tested, and ready for teams that need governed autonomy.

Built by Julian Hermstad at JuhLabs.

Finding JuhBDI helpful? Give us a star on GitHub!