buckley

module
v2.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2026 License: MIT

README

Buckley

Go Reference CI Release

Buckley is a tool-first AI agent harness for serious repository work.

It combines resumable sessions, Arbiter-governed model and tool selection, Claude-style repository instructions, and multiple operator surfaces: terminal, browser, one-shot, ACP, and LSP.

Agent Skill

Agents working with Buckley should use the using-buckley skill.

Why Buckley

  • One shared runtime powers TUI chat, buckley -p, headless sessions, ACP editor flows, and browser control.
  • Arbiter governs planning/execution/review model routing, reasoning effort, tool pools, timeouts, approvals, and escalation.
  • Runtime prompt assembly automatically pulls in AGENTS.md, CLAUDE.md, .claude/instructions.md, project context, and active skills.
  • Tool use is first-class. Buckley ships with 38 built-in tool entry points plus skills, plugins, telemetry, approvals, and SQLite-backed persistence.
  • Sessions survive crashes. Plans, approvals, telemetry, and artifacts stay resumable.

Quick Start

go install m31labs.dev/buckley/v2/cmd/buckley@latest
export OPENROUTER_API_KEY="your-key"
buckley

OpenAI, Anthropic, Google, and Ollama are also supported. OpenRouter is the default path when available.

Interfaces

Surface Command Use case
TUI buckley Interactive coding with approvals, streaming, history, and highlighted code
One-shot buckley -p "inspect this repo and fix the failing tests" Fast task execution from the terminal
Browser UI buckley serve --browser Mission Control, approvals, and remote session control
ACP agent buckley acp Editor agent for ACP-compatible clients
LSP bridge buckley lsp LSP editor integration on stdio

Core Workflow

buckley plan "add auth" "support email/password login"
buckley execute <plan-id>
buckley review
buckley review-pr 123
buckley review-pr 123 --model codex/auto

The planner, builder, review, and runtime layers share the same governance stack, persistence, and tool registry.

Notable Capabilities

  • Fully integrated Arbiter runtime across one-shot, TUI, ACP, and headless execution paths.
  • Shared runtime prompt assembly for repo instructions, project context, working directory, and skills.
  • Governed tool exposure with role/task-aware pool filtering before tool calls are shown to the model.
  • Anthropic tool calling and tool-result round-tripping, so Claude-class models can participate in the same tool loop.
  • Better model resolution for routed raw IDs such as unqualified Claude model names.

Commands People Actually Use

buckley commit
buckley pr
buckley review
buckley review-pr 123
buckley hunt
buckley dream
buckley experiment run "compare-routing" -m z-ai/glm-5.2 -m moonshotai/kimi-k2.7-code -p "Implement feature X"

buckley review examines one immutable snapshot of the selected local scope. Untracked files are excluded by default; repeat --include-untracked path/to/new.go to explicitly allowlist worktree files that may be sent to the model, after inspecting them for secrets. Native Codex verification receives a self-contained copy of only the captured commit plus patch; its JSONL command events must prove successful, classifiable build and test runs that cover the changed source paths. Use --model codex/auto to select Luna with xhigh reasoning for focused changes, Terra with medium reasoning for standard changes, and Sol with medium reasoning for broad or project reviews. An exact model override remains fixed. API-model inspection tools are rooted to an independently materialized copy of that snapshot and can run only deterministic build/test/check plans in an OS-enforced, read-only-source sandbox. buckley review-pr adds the remote PR diff, CI state, submitted reviews, and unresolved inline feedback; run it from a checkout whose HEAD is the PR head so verification is pinned to the same revision. API approvals require actual successful verification tool calls—not prose claiming PASS—and build/test evidence must use one applicable toolchain and cover every changed source package. Branch and PR approvals require passing verification, complete evidence, an explicit disposition for every supplied feedback ID, and an independent approval-critic pass. buckley review -project is an advisory architecture assessment and cannot issue an approval verdict. buckley commit and buckley pr use transparent tool-first workflows rather than opaque text-only prompting. In the TUI, fenced code blocks use Tree-sitter highlighting when the language grammar is available. Use Shift+Enter to add a line without sending and Alt+C to copy the latest code block. Conversation projection searches for the largest compacted history that fits the provider request budget.

Configuration

Configuration is layered:

~/.buckley/config.yaml
./.buckley/config.yaml
environment variables

Minimal setup:

providers:
  openrouter:
    api_key: ${OPENROUTER_API_KEY}

Buckley supports separate planning, execution, and review models:

models:
  planning: z-ai/glm-5.2
  execution: z-ai/glm-5.2
  review: moonshotai/kimi-k2.7-code
  reasoning: xhigh

Skills And Instructions

Buckley ships with 8 bundled skills, including planning, code review, systematic debugging, refactoring, test-driven development, API design, git workflow, and creative writing.

Skills layer on top of repository instructions. If a repo already uses AGENTS.md or CLAUDE.md, Buckley consumes them automatically and applies the same guidance across terminal, headless, and editor sessions.

Development

./scripts/test.sh
go build ./cmd/buckley

Primary repo docs live under docs/.

License

MIT. See LICENSE.

Directories

Path Synopsis
benchmarks
ctxfabric/cmd/bench command
Command bench is the PR 0 measurement-only baseline for the M31 Context Fabric spec.
Command bench is the PR 0 measurement-only baseline for the M31 Context Fabric spec.
ctxfabric/corpus
Package corpus loads the PR 0 agent evaluation corpus (testdata/agent_eval/corpus.yaml) and turns each scenario's declared fixture shape into a deterministic model.ChatRequest, so the same manifest always produces the same measured metrics.
Package corpus loads the PR 0 agent evaluation corpus (testdata/agent_eval/corpus.yaml) and turns each scenario's declared fixture shape into a deterministic model.ChatRequest, so the same manifest always produces the same measured metrics.
cmd
buckley command
pkg
acp
Package acp implements the Agent Client Protocol (ACP) for editor integration.
Package acp implements the Agent Client Protocol (ACP) for editor integration.
agent
Package agent provides the agent runtime for multi-agent orchestration.
Package agent provides the agent runtime for multi-agent orchestration.
agentloop
Package agentloop provides shared safety and progress detection for model/tool loops.
Package agentloop provides shared safety and progress detection for model/tool loops.
approval
Package approval provides tiered permission control for agent operations.
Package approval provides tiered permission control for agent operations.
bus
Package bus provides a message bus abstraction for agent communication.
Package bus provides a message bus abstraction for agent communication.
commitmsg
Package commitmsg holds small, dependency-free helpers shared by every commit-message rendering path (the oneshot commit tool, the oneshot command definition, and the orchestrator commit generator).
Package commitmsg holds small, dependency-free helpers shared by every commit-message rendering path (the oneshot commit tool, the oneshot command definition, and the orchestrator commit generator).
coordination/coordinator
Package coordinator provides Buckley-internal coordination primitives (not ACP).
Package coordinator provides Buckley-internal coordination primitives (not ACP).
coordination/events
Package events provides Buckley-internal coordination event storage.
Package events provides Buckley-internal coordination event storage.
diffsignal
Package diffsignal shapes raw unified diffs into model-friendly context: hand-written source changes first at full fidelity, low-signal bulk (binary, generated paths, minified content) reduced to one-line summaries.
Package diffsignal shapes raw unified diffs into model-friendly context: hand-written source changes first at full fidelity, low-signal bulk (binary, generated paths, minified content) reduced to one-line summaries.
evidence
Package evidence implements the Buckley evidence store: a content-addressed, typed record of durable artifacts (source, tool results, diffs, reviews, checkpoints, and similar objects) that the context fabric and run ledger reference by ID.
Package evidence implements the Buckley evidence store: a content-addressed, typed record of durable artifacts (source, tool results, diffs, reviews, checkpoints, and similar objects) that the context fabric and run ledger reference by ID.
gts
headless
Package headless provides API-driven conversation sessions without a TUI.
Package headless provides API-driven conversation sessions without a TUI.
image
Package image provides image input handling for AI assistants.
Package image provides image input handling for AI assistants.
ipc
Package ipc's no-op web UI stub.
Package ipc's no-op web UI stub.
ipc/push
Package push provides Web Push notification functionality for the Buckley PWA.
Package push provides Web Push notification functionality for the Buckley PWA.
mcp
Package mcp implements a Model Context Protocol (MCP) client for connecting Buckley to external stdio tool servers.
Package mcp implements a Model Context Protocol (MCP) client for connecting Buckley to external stdio tool servers.
notify
Package notify provides async notifications for human-in-the-loop workflows.
Package notify provides async notifications for human-in-the-loop workflows.
oneshot
Package oneshot provides the framework for one-shot CLI commands.
Package oneshot provides the framework for one-shot CLI commands.
oneshot/commit
Package commit implements the generate_commit tool for buckley commit.
Package commit implements the generate_commit tool for buckley commit.
oneshot/plugin
Package plugin provides YAML-based one-shot command definitions.
Package plugin provides YAML-based one-shot command definitions.
orchestrator
Package orchestrator's no-op batch coordinator stub.
Package orchestrator's no-op batch coordinator stub.
orchestrator/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
parallel
Package parallel provides parallel agent execution using git worktrees.
Package parallel provides parallel agent execution using git worktrees.
persona
Package persona parses tiller-compatible persona files and resolves them into a registry buckley's subagent manager can consume.
Package persona parses tiller-compatible persona files and resolves them into a registry buckley's subagent manager can consume.
pool
Package pool provides memory pooling utilities to reduce GC pressure in high-throughput paths.
Package pool provides memory pooling utilities to reduce GC pressure in high-throughput paths.
push
Package push implements Web Push notification delivery.
Package push implements Web Push notification delivery.
ralph
pkg/ralph/backend.go
pkg/ralph/backend.go
rlm
rlm/runner
Package runner provides plan execution using the RLM runtime.
Package runner provides plan execution using the RLM runtime.
runledger
Package runledger implements Buckley's durable run ledger: an append-only, per-run sequence of typed events, plus the agent run tree, context receipts, task checkpoints, and metric samples that section 14 of the M31 Context Fabric spec defines as the canonical (non-live) record of what an agent run did.
Package runledger implements Buckley's durable run ledger: an append-only, per-run sequence of typed events, plus the agent run tree, context receipts, task checkpoints, and metric samples that section 14 of the M31 Context Fabric spec defines as the canonical (non-live) record of what an agent run did.
sandbox
Package sandbox provides sandboxed command execution for security.
Package sandbox provides sandboxed command execution for security.
sdk
Package sdk exposes a stable, embeddable interface for driving Buckley's orchestrator programmatically.
Package sdk exposes a stable, embeddable interface for driving Buckley's orchestrator programmatically.
sdk/grpc
Package grpcsdk hosts the lightweight gRPC bridge for Buckley's SDK.
Package grpcsdk hosts the lightweight gRPC bridge for Buckley's SDK.
terminal
Package terminal provides Claude Code-style terminal output with rich markdown rendering, syntax highlighting, and styled output.
Package terminal provides Claude Code-style terminal output with rich markdown rendering, syntax highlighting, and styled output.
tools
Package tools provides structured tool definitions for LLM tool-use.
Package tools provides structured tool definitions for LLM tool-use.
transparency
Package transparency provides full visibility into LLM invocations.
Package transparency provides full visibility into LLM invocations.
ui/backend
Package backend defines the terminal backend interface for the TUI.
Package backend defines the terminal backend interface for the TUI.
ui/backend/sim
Package sim provides a simulation backend for testing.
Package sim provides a simulation backend for testing.
ui/backend/tcell
Package tcell provides a Backend implementation using tcell.
Package tcell provides a Backend implementation using tcell.
ui/compositor
Package compositor provides terminal style and screen primitives.
Package compositor provides terminal style and screen primitives.
ui/filepicker
Package filepicker provides fuzzy file search with @ trigger for inline file selection.
Package filepicker provides fuzzy file search with @ trigger for inline file selection.
ui/runtime
Package runtime provides the widget runtime for Buckley's TUI.
Package runtime provides the widget runtime for Buckley's TUI.
ui/scrollback
Package scrollback provides app-owned conversation history with selection and search.
Package scrollback provides app-owned conversation history with selection and search.
ui/shadowgit
Package shadowgit snapshots a git worktree into a hidden ref namespace (refs/buckley/undo/<session>) so the TUI can revert and restore file changes turn by turn, without creating visible branches or touching the caller's git index.
Package shadowgit snapshots a git worktree into a hidden ref namespace (refs/buckley/undo/<session>) so the TUI can revert and restore file changes turn by turn, without creating visible branches or touching the caller's git index.
ui/terminal
Package terminal provides terminal event types used throughout the UI.
Package terminal provides terminal event types used throughout the UI.
ui/theme
Package theme provides a unified visual design system for Buckley's TUI.
Package theme provides a unified visual design system for Buckley's TUI.
ui/tui
Package tui provides the integrated terminal user interface for Buckley.
Package tui provides the integrated terminal user interface for Buckley.
ui/widgets
Package widgets provides concrete widget implementations for Buckley's TUI.
Package widgets provides concrete widget implementations for Buckley's TUI.
tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL