Skip to content

Repository files navigation

WBZ

A sparse agent foundry where AI executes and reviews while humans govern.

WBZ is a local-first control plane for bounded autonomous software work. It creates an isolated Git worktree for each task, invokes a builder only when useful, verifies the result with deterministic checks, and escalates only exceptions and high-risk changes.

Status: v0.1 is an early vertical-slice implementation. It does not push, open pull requests, merge, deploy, read secrets, or run cloud models in CI.

WABI philosophy

  • Work with limits — finite retries, capacity-aware pauses, and one task at a time.
  • Act autonomously — proceed inside explicit boundaries without routine approvals.
  • Build with evidence — tests, policy results, diffs, and audit events precede trust.
  • Improve through iteration — preserve validated capabilities, not agent personas.

The full invariants are in CONSTITUTION.md.

Review in public

WBZ welcomes independent review. Start with the architecture, threat model, and contribution guide. Use a design-review issue to challenge a policy or architecture decision. Report vulnerabilities through SECURITY.md, not a public exploit description.

Vertical slice

Goal → isolated worktree → Builder → deterministic checks → Policy
                                                       ├─ low: complete
                                                       ├─ medium: independent review
                                                       └─ high: wait for human

State is persisted in SQLite. A restart resumes from the recorded task state. Model capacity errors become waiting_capacity; unsafe or unverifiable changes become waiting_human or quarantined.

Requirements

  • Python 3.12+
  • Git
  • Claude Code authenticated for normal implementation
  • Codex CLI authenticated for independent review and diagnosis

No API key or additional paid cloud service is required by WBZ itself.

Quick start

py -3.12 -m venv .venv
.venv\Scripts\python -m pip install -e ".[dev]"
Copy-Item wbz.example.yaml wbz.yaml
.venv\Scripts\wbz --config wbz.yaml init
.venv\Scripts\wbz --config wbz.yaml doctor

Run the deterministic, zero-cost demo:

.venv\Scripts\wbz --config wbz.yaml demo

To keep that populated demo open in the dashboard, run wbz demo --serve.

Open the local audit dashboard:

.venv\Scripts\wbz --config wbz.yaml serve

Then visit http://127.0.0.1:8765.

Operate a repository

Configure allowed checks and policy boundaries in wbz.yaml, then submit a bounded goal:

wbz --config wbz.yaml submit --repository C:\path\to\repo --goal "Repair the failing parser test"
wbz --config wbz.yaml run --once
wbz --config wbz.yaml status

Human controls are deliberately small:

pause · resume · stop · rollback · change goal · release quarantine

The v0.1 CLI and localhost API implement all six controls. Use wbz goal to change a top-level goal and wbz release to return a quarantined task to the bounded queue.

Safety boundaries

  • Each task runs in .wbz-worktrees, never in the source checkout.
  • Model tools are constrained; Codex review is read-only.
  • Protected paths immediately route to human review.
  • Builder and reviewer receive separate contexts.
  • Empty-time self-improvement is forbidden.
  • Retries and agent-spec creation are bounded by policy.
  • The dashboard binds only to loopback.
  • GitHub mutations are outside the v0.1 runtime.

Treat the worktree sandbox as one defense layer, not a security boundary for hostile code. Review repository checks before running WBZ against untrusted projects.

Public interfaces

wbz init       initialize SQLite state and worktree storage
wbz doctor     inspect Python, Git, Claude, Codex, and policy readiness
wbz submit     create a goal and queued task
wbz run        execute the sparse loop
wbz status     print the audit snapshot
wbz serve      run the localhost dashboard
wbz pause      stop scheduling new work
wbz resume     resume scheduling
wbz stop       stop the control plane
wbz rollback   discard an isolated task worktree
wbz release    release a quarantined task after human review
wbz goal       change a top-level goal statement
wbz demo       run an offline deterministic vertical slice

Published schemas live under schemas/. Unknown AgentSpec and review fields are rejected.

Development

.venv\Scripts\python -m pytest
.venv\Scripts\python -m compileall -q src

GitHub Actions runs only the deterministic test suite. Claude, Codex, tokens, and API keys are intentionally absent from CI.

License

MIT

About

Sparse Agent Foundry: AI creates and reviews reusable capabilities; humans govern goals and risk.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages