# LACP
**Control-plane-grade agent harness for Claude, Codex & Hermes.**
LACP is a harness-first execution framework with policy-gated operations, verification/evidence loops, 5-layer memory, and auditable agent workflows — all local-first, zero external dependencies.
[](https://github.com/0xNyk/lacp/stargazers)
[](https://github.com/0xNyk/lacp/network/members)
[](LICENSE)
[](https://github.com/0xNyk/lacp/releases)
[](https://github.com/0xNyk/lacp/commits/main)
[](https://github.com/0xNyk/lacp/issues)
[](https://github.com/0xNyk/lacp)

---
> **Alpha Release** — LACP v0.9.0 is under active development. The native REPL, multi-provider routing, hermes-style tool display, and memory system are functional but evolving fast. APIs and CLI interfaces may change between releases. [Report issues](https://github.com/0xNyk/lacp/issues).
## Contents
- [Quick Start](#quick-start)
- [Why teams adopt LACP](#why-teams-adopt-lacp)
- [Use-case recipes](#use-case-recipes)
- [Documentation](#documentation)
- [Architecture](#architecture)
- [Features](#features)
- [Prerequisites](#prerequisites)
- [Install Options](#install-options)
- [Who It's For](#who-its-for)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
### What LACP is (by harness definition)
LACP is an **agent harness** with **control-plane governance**:
- **Harness layer:** tasks, verification contracts, evidence manifests, replayable run loops
- **Control-plane layer:** risk tiers, budget gates, context/session contracts, approvals, provenance
This keeps the core value clear: not just generating output, but producing **auditable, policy-compliant outcomes**.
| Policy gates | Risk tiers (safe/review/critical), budget ceilings, context contracts, and session fingerprints — every agent invocation is gated and auditable. |
| 5-layer memory | Session memory, Obsidian knowledge graph, ingestion pipeline, code intelligence (GitNexus), and agent identity with hash-chained provenance. |
| Hook pipeline | Modular Python hooks for Claude Code — session context injection, pretool guards, write validation, and stop quality gates with local LLM eval. |
| Obsidian brain | First-class vault management, mycelium-inspired memory consolidation, QMD indexing, and config-as-code with auto-optimization. |
| Multi-agent orchestration | dmux/tmux session management, git worktree isolation, swarm workflows, and Claude native worktree backend. |
| Local-first security | Zero external CI by default, no secrets in config, environment-driven credentials, TTL approval tokens for remote execution. |
| Execution tiers | trusted_local, local_sandbox, and remote_sandbox (Daytona/E2B) with policy-driven routing and provider override. |
| Evidence pipelines | Browser e2e, API e2e, smart-contract e2e harnesses with manifest evidence, auth checks, and PR preflight gates. |
---
## Quick Start
### Install
```bash
# Homebrew (recommended)
brew tap 0xNyk/lacp && brew install lacp
# or cURL bootstrap
curl -fsSL https://raw.githubusercontent.com/0xNyk/lacp/main/install.sh | bash
```
### Bootstrap & Verify
```bash
lacp bootstrap-system --profile starter --with-verify
lacp doctor --json | jq '.ok,.summary'
```
After bootstrap: `.env` is created, dependencies installed, directories scaffolded, Obsidian vault wired, and verification artifacts produced.
For the full setup and daily operator flow, start with the [Runbook](docs/runbook.md) and [Local Dev Loop](docs/local-dev-loop.md).
### First Gated Command
```bash
# Route a task through LACP policy gates
lacp run --task "hello world" --repo-trust trusted -- echo "LACP is working"
# Make claude/codex/hermes default to LACP routing (reversible)
lacp adopt-local --json | jq
```
## Why teams adopt LACP
- Predictable execution: every run passes through deterministic policy and budget gates.
- Auditability by default: artifacts, provenance, and verification logs are first-class outputs.
- Local-first security posture: remote execution is opt-in and secrets stay environment-scoped.
- Multi-agent without chaos: worktree/session isolation keeps parallel runs reproducible.
## Use-case recipes
### 1) Harden local agent usage in under 5 minutes
```bash
lacp bootstrap-system --profile starter --with-verify
lacp adopt-local --json | jq
lacp posture --strict
```
### 2) Run one risky command with explicit policy controls
```bash
lacp run \
--task "dependency update with tests" \
--repo-trust trusted \
--context-profile default \
-- pnpm up && pnpm test
```
### 3) Generate PR-ready evidence before opening a PR
```bash
lacp e2e smoke --workdir . --init-template --command "npx playwright test --grep @smoke"
lacp api-e2e smoke --workdir . --init-template --command "npx schemathesis run --checks all"
lacp pr-preflight --changed-files ./changed-files.txt --checks-json ./checks.json
```
### 4) Run parallel agents safely on isolated worktrees
```bash
lacp worktree create --repo-root . --name feature-a --base HEAD
lacp up --session feature-a --instances 3 --command "claude"
lacp swarm launch --manifest ./swarm.json
```
---
## Documentation
| Guide | What You'll Learn |
|-------|-------------------|
| [Runbook](docs/runbook.md) | Daily operator workflow, command map, troubleshooting entry points |
| [Local Dev Loop](docs/local-dev-loop.md) | Fast build/test/verify loop for contributors |
| [Framework Scope](docs/framework-scope.md) | What LACP is, what it is not, and design boundaries |
| [Implementation Path](docs/implementation-path-2026.md) | Step-by-step rollout plan for full harness adoption |
| [Memory Quality Workflow](docs/memory-quality-workflow.md) | How memory ingestion, expansion, and validation are run safely |
| [Incident Response](docs/incident-response.md) | Triage and recovery flow when policy gates fail |
| [Release Checklist](docs/release-checklist.md) | Pre-release, release, and post-release controls |
| [Troubleshooting](docs/troubleshooting.md) | Common errors, doctor diagnostics, fix hints |
### Project health files
- [CONTRIBUTING.md](CONTRIBUTING.md) — contribution and PR expectations
- [SECURITY.md](SECURITY.md) — vulnerability disclosure process
- [CHANGELOG.md](CHANGELOG.md) — release history
- [LICENSE](LICENSE) — MIT
---
## Architecture
```
lacp/
├── bin/ # CLI commands (lacp