lacp

作者 0xNyk已验证

Local-first policy, evidence, memory, and recovery controls for Claude, Codex, Hermes, and other CLI coding agents.

293
Stars
0
Forks
Shell
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/0xNyk/lacp

快速入门

使用 lacp 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

LACP

Local policy, evidence, and recovery controls for coding agents.

LACP wraps Claude, Codex, Hermes, and other CLI agents with deterministic routing, approval gates, execution records, memory controls, and rollback paths. It runs on your machine and keeps remote execution opt-in.

GitHub stars License: MIT Main: 0.10.1 Latest release: v0.10.1 Last commit Open issues Shell

LACP routes agent work through policy gates and evidence


Development status: main and the GitHub release are v0.10.1. Homebrew's last bottled release may lag until the tap is updated; brew install --HEAD tracks main. Git worktrees isolate files, not ports — see Runtime isolation.

Contents

What LACP controls

LACP is a local execution wrapper and control plane. The coding-agent host still owns its model, tools, session, and interface. LACP owns the contract around a run: where it may execute, which risk tier applies, when approval is required, what evidence must be kept, and how a failed change is recovered.

The host owns the agent; LACP governs the run contract

ExecutionRisk tiers, budgets, context contracts, session fingerprints, and local or remote sandbox routing.
VerificationBrowser, API, and contract evidence manifests with PR preflight and release gates.
MemorySession memory, Obsidian workflows, ingestion, optional code intelligence, and provenance.
CoordinationWorktree isolation, tmux/dmux sessions, swarm manifests, handoffs, and recovery paths.

Quick start

Install

# Homebrew (recommended)
brew tap 0xNyk/lacp && brew install lacp

# or inspect and run the bootstrap at a published tag
curl -fsSLo /tmp/lacp-install.sh \
  https://raw.githubusercontent.com/0xNyk/lacp/v0.10.1/install.sh
LACP_REF=v0.10.1 bash /tmp/lacp-install.sh

Bootstrap and verify

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 and Local Dev Loop.

First gated command

# 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

Intent becomes a routed, approved, evidenced run

Why teams adopt LACP

  • Route commands through explicit policy and budget gates.
  • Keep evidence, provenance, and verification results with each run.
  • Leave remote execution disabled until an operator enables it.
  • Isolate parallel agents with sessions and Git worktrees.

Use-case recipes

1) Harden local agent usage in under 5 minutes

lacp bootstrap-system --profile starter --with-verify
lacp adopt-local --json | jq   # wraps claude + codex only; Hermes stays native
lacp posture --strict

2) Run one risky command with explicit policy controls

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

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

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

GuideWhat You'll Learn
RunbookDaily operator workflow, command map, troubleshooting entry points
Local Dev LoopFast build/test/verify loop for contributors
Framework ScopeWhat LACP is, what it is not, and design boundaries
Implementation PathStep-by-step rollout plan for full control-plane adoption
Memory Quality WorkflowHow memory ingestion, expansion, and validation are run safely
Incident ResponseTriage and recovery flow when policy gates fail
Release ChecklistPre-release, release, and post-release controls
TroubleshootingCommon errors, doctor diagnostics, fix hints
Runtime isolationWorktrees vs ports vs Claude host isolation

Project health files


Architecture

lacp/
├── bin/                    # CLI commands (lacp <command>)
│   ├── lacp                # Top-level dispatcher
│   ├── lacp-bootstrap-system
│   ├── lacp-doctor         # Diagnostics (--json, --fix-hints)
│   ├── lacp-route          # Policy-driven tier/provider routing
│   ├── lacp-sandbox-run    # Gated execution with artifact logging
│   ├── lacp-brain-*        # Memory stack (ingest, expand, doctor, stack)
│   ├── lacp-obsidian       # Vault config management
│   ├── lacp-up             # Multi-instance agent sessions
│   ├── lacp-swarm          # Batch orchestration
│   └── lacp-claude-hooks   # Hook profile management
├── config/
│   ├── sandbox-policy.json     # Routing + cost ceilings
│   ├── risk-policy-contract.json
│   ├── obsidian/               # Vault manifest + optimization profiles
│   └── harness/                # Task schemas, sandbox profiles, verification policies
├── hooks/                  # Python hook pipeline for Claude Code
├── scripts/
│   ├── ci/                 # Test suites
│   └── runners/            # Daytona/E2B execution adapters
└── docs/                   # Guides and reference docs

Control Flow

Agent invocation
  → lacp route (risk tier + provider selection)
    → context contract validation
      → budget gate check
        → session fingerprint verification
          → sandbox-run (dispatch + artifact logging)

Features

Policy-Gated Execution

Every command routes through risk tiers (safereviewcritical), budget ceilings per tier, and context contracts that validate host, working directory, git branch, and remote targets before execution.

LACP routes safe, review, and critical work through different execution gates

5-Layer Memory Stack

LayerPurpose
Session memoryPer-project scaffolding under ~/.claude/projects/
Knowledge graphObsidian vault with MCP wiring (smart-connections, QMD, ori-mnemos)
Ingestion pipelinebrain-ingest converts text/audio/video/URLs into structured notes
Code intelligenceGitNexus AST-level knowledge graph via MCP (optional)
Agent identityPersistent IDs per (hostname, project) + SHA-256 hash-chained provenance
lacp brain-stack init --json | jq          # Bootstrap all layers
lacp brain-ingest --url "https://..." --apply --json | jq
lacp brain-expand --apply --json | jq      # Full expansion loop

Hook Pipeline for Claude Code

Modular Python hooks enforcing quality at every session stage:

HookEventPurpose
session_start.pySessionStartGit context injection, test command caching
pretool_guard.pyPreToolUseBlock dangerous operations (publish, chmod 777, fork bombs, secrets)
write_validate.pyPostToolUseYAML frontmatter schema validation
stop_quality_gate.pyStop3-tier eval: heuristics, test verification, local LLM rationalization detection

Profiles: minimal-stop, balanced, hardened-exec, quality-gate-v2. Apply with lacp claude-hooks apply-profile <profile>. hardened-exec also logs SubagentStart / SubagentStop. It does not install a WorktreeCreate hook (that event replaces Claude's git worktree creation).

Mycelium Network Memory

Biologically-inspired memory consolidation modeled on fungal networks:

MechanismDescription
Adaptive path reinforcementFrequently-traversed edges strengthen (like mycelium hyphae)
Self-healingPruned nodes trigger reconnection of orphaned neighbors
Exploratory tendrilsFrontier nodes in active categories shielded from pruning
Flow scoringBetweenness centrality identifies critical knowledge hubs
Temporal decayFSRS dual-strength model with forgetting curve

Multi-Agent Orchestration

# dmux-style multi-instance launch
lacp up --session dev --instances 3 --command "claude"

# Git worktree isolation
lacp worktree create --repo-root . --name "feature-a" --base HEAD

# Batch swarm execution
lacp swarm launch --manifest ./swarm.json

Evidence Pipelines

Generate machine-verifiable evidence for PR gates:

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 contract-e2e smoke --workdir . --init-template --command "forge test -vv"
lacp pr-preflight --changed-files ./changed-files.txt --checks-json ./checks.json

Evidence determines whether LACP promotes a result or restores known state


Prerequisites

RequiredRecommended
bash, python3, jq, rg (ripgrep)shellcheck, tmux, gh

The installer auto-detects and installs missing dependencies on macOS via Homebrew.

Install options

All installation methods

Homebrew

brew tap 0xNyk/lacp
brew install lacp            # published v0.10.1 release (tap may lag)
brew install --HEAD lacp     # current main

cURL Bootstrap

curl -fsSLo /tmp/lacp-install.sh \
  https://raw.githubusercontent.com/0xNyk/lacp/v0.10.1/install.sh
LACP_REF=v0.10.1 bash /tmp/lacp-install.sh

Change both references to main only when you intend to install unreleased development code. The script also accepts --dir, --profile, and --with-verify; run it with --help before installation to see the full contract.

Who it is for

LACP is for developers who need reproducible local agent runs with explicit pass/fail gates and artifacts that can be inspected after execution.

It is a poor fit when you want a managed cloud service, a chat UI, or a setup with no local policy and configuration to maintain.

Testing

lacp test --quick       # Fast smoke tests
lacp test --isolated    # Full isolated suite
lacp doctor --json      # Structured diagnostics
lacp posture --strict   # Policy compliance check
Individual test suites
scripts/ci/test-route-policy.sh
scripts/ci/test-mode-and-gates.sh
scripts/ci/test-knowledge-doctor.sh
scripts/ci/test-ops-commands.sh
scripts/ci/test-install.sh
scripts/ci/test-system-health.sh
scripts/ci/test-obsidian-cli.sh
scripts/ci/test-brain-memory.sh
scripts/ci/smoke.sh
Command reference

Core

CommandPurpose
lacp bootstrap-systemOne-command install + onboard + verify
lacp doctorStructured diagnostics (--json, --fix-hints, --check-limits)
lacp statusCurrent operating state snapshot
lacp modeSwitch local-only / remote-enabled
lacp runSingle gated command execution
lacp loopIntent → execute → observe → adapt control loop
lacp testLocal test suite (--quick, --isolated)

Memory & Knowledge

CommandPurpose
lacp brain-stackInitialize/audit 5-layer memory stack
lacp brain-ingestIngest text/audio/video/URLs into Obsidian
lacp brain-expandFull brain expansion loop
lacp brain-doctorMemory-system health checks
lacp obsidianVault config management (audit/apply/optimize)
lacp repo-research-syncMirror repo research into knowledge graph

Orchestration

CommandPurpose
lacp updmux-style multi-instance launch
lacp orchestratedmux/tmux/worktree orchestration adapter
lacp worktreeGit worktree lifecycle management
lacp swarmBatch swarm workflow (plan/launch/status)
lacp adopt-localWrap claude/codex (optional --with-hermes / --with-grok)

Security & Policy

CommandPurpose
lacp routeDeterministic tier/provider routing
lacp sandbox-runGated execution with artifact logging
lacp policy-packApply policy baselines (starter/strict/enterprise)
lacp claude-hooksAudit/repair/optimize hook profiles
lacp security-hygieneSecret/path/workflow/.env scan
lacp pr-preflightPR policy gate evaluation

Release & Evidence

CommandPurpose
lacp release-preparePre-live discipline (gate + canary + status)
lacp release-verifyRelease verification (checksum + archive + brew)
lacp e2eBrowser e2e evidence pipeline
lacp api-e2eAPI/backend e2e evidence pipeline
lacp contract-e2eSmart-contract e2e evidence pipeline
lacp canary7-day promotion gate over retrieval benchmarks

Utilities

CommandPurpose
lacp consoleInteractive slash-command shell
lacp timeProject/client session time tracking
lacp agent-idPersistent agent identity registry
lacp provenanceCryptographic session provenance chain
lacp context-profileReusable context contract templates
lacp vendor-watchMonitor Claude/Codex version drift
lacp system-healthmacOS/Apple Silicon workstation readiness
lacp mcp-healthProbe all configured MCP servers

Security

  • No secrets in repo config; credentials come from the environment or local .env
  • Zero external CI by default (LACP_NO_EXTERNAL_CI=true)
  • Remote execution disabled by default (LACP_ALLOW_EXTERNAL_REMOTE=false)
  • Risk-tier gating with TTL approval tokens
  • Structured input contracts for risky runs
  • Artifact logs for auditable execution history
  • See SECURITY.md for vulnerability reporting

Contributing

Contributions welcome. See CONTRIBUTING.md for guidelines.

Support

If LACP helps your work, sponsor its continued maintenance.

Solana: 2k1oq9U99mwy4gm8P2hXPJoZusoXQCpFs35EEf5Ve73y


Need agent infrastructure, trading systems, or Solana applications built for your team?

Builderz ships production AI systems across 32+ products in 15 countries.

Get in touch | Nyk | @nykdotdev

License

MIT © 2026 0xNyk


From this repo to a working agent OS

Quiet commercial paths from nyk.dev — same operator, fixed scope:

常见问题

What is lacp?

lacp is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by 0xNyk. Local-first policy, evidence, memory, and recovery controls for Claude, Codex, Hermes, and other CLI coding agents. It has 293 GitHub stars.

Is lacp safe to use?

Yes. lacp passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install lacp?

Clone the repository with "git clone https://github.com/0xNyk/lacp" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is lacp written in?

lacp is primarily written in Shell. It is open-source under 0xNyk on GitHub, so you can review or fork the full source.

Are there alternatives to lacp?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh lacp against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情