### Bootstrap LACP System Source: https://github.com/0xnyk/lacp/blob/main/docs/runbook.md Initializes the LACP system for first-time setup. It can be done by navigating to the LACP directory and running the bootstrap command, or by using a curl command to download and execute an installation script. ```bash cd /path/to/lacp bin/lacp bootstrap-system --profile starter --with-verify ``` ```bash curl -fsSL https://raw.githubusercontent.com/0xNyk/lacp/main/install.sh | bash ``` -------------------------------- ### Bootstrap LACP System Configuration Source: https://github.com/0xnyk/lacp/blob/main/README.md This command initiates the LACP system setup. It automatically installs missing dependencies, creates and configures the `.env` file with safe defaults, applies a specified policy pack, scaffolds necessary directories, sets up the Obsidian vault, links shared skills, creates stub automation scripts, and runs initial onboarding and verification checks. ```bash lacp bootstrap-system --profile starter --with-verify ``` -------------------------------- ### Troubleshoot Homebrew Installation Source: https://github.com/0xnyk/lacp/blob/main/docs/troubleshooting.md Verifies release assets and performs dry-run installations to debug Homebrew tap issues. Useful when version tags or checksums mismatch. ```bash bin/lacp release-verify --tag vX.Y.Z --skip-prepare --allow-dirty --json | jq brew info 0xnyk/lacp/lacp brew install --dry-run 0xnyk/lacp/lacp ``` -------------------------------- ### Bootstrap and Install LACP Source: https://context7.com/0xnyk/lacp/llms.txt Commands to install the LACP framework via Homebrew, cURL, or manual release verification, followed by system bootstrapping. ```bash # Homebrew (recommended on macOS) brew tap 0xNyk/lacp brew install lacp # Or cURL bootstrap curl -fsSL https://raw.githubusercontent.com/0xNyk/lacp/main/install.sh | bash # Or verified release install VERSION="0.3.0" curl -fsSLO "https://github.com/0xNyk/lacp/releases/download/v${VERSION}/lacp-${VERSION}.tar.gz" curl -fsSLO "https://github.com/0xNyk/lacp/releases/download/v${VERSION}/SHA256SUMS" grep "lacp-${VERSION}.tar.gz" SHA256SUMS | shasum -a 256 -c - tar -xzf "lacp-${VERSION}.tar.gz" cd "lacp-${VERSION}" # Run bootstrap with starter profile and verification lacp bootstrap-system --profile starter --with-verify ``` -------------------------------- ### Verified Release Install for Production Source: https://github.com/0xnyk/lacp/blob/main/README.md Steps for installing a specific verified release of LACP, including downloading the tarball and SHA256 sums, verifying integrity, extracting, and installing. ```bash VERSION="0.3.0" curl -fsSLO "https://github.com/0xNyk/lacp/releases/download/v${VERSION}/lacp-${VERSION}.tar.gz" curl -fsSLO "https://github.com/0xNyk/lacp/releases/download/v${VERSION}/SHA256SUMS" grep "lacp-${VERSION}.tar.gz" SHA256SUMS | shasum -a 256 -c - tar -xzf "lacp-${VERSION}.tar.gz" cd "lacp-${VERSION}" bin/lacp-install --profile starter --with-verify ``` -------------------------------- ### Install LACP using Homebrew or cURL Source: https://github.com/0xnyk/lacp/blob/main/README.md Provides instructions for installing the LACP tool. It covers installation via Homebrew for macOS users, a cURL bootstrap script for general use, and manual installation from a verified release archive. The manual installation includes checksum verification for integrity. ```bash # Homebrew (recommended on macOS) brew tap 0xNyk/lacp brew install lacp # or cURL bootstrap curl -fsSL https://raw.githubusercontent.com/0xNyk/lacp/main/install.sh | bash # or verified release VERSION="0.3.0" curl -fsSLO "https://github.com/0xNyk/lacp/releases/download/v${VERSION}/lacp-${VERSION}.tar.gz" curl -fsSLO "https://github.com/0xNyk/lacp/releases/download/v${VERSION}/SHA256SUMS" grep "lacp-${VERSION}.tar.gz" SHA256SUMS | shasum -a 256 -c - tar -xzf "lacp-${VERSION}.tar.gz" cd "lacp-${VERSION}" ``` -------------------------------- ### Start LACP Instance Source: https://github.com/0xnyk/lacp/blob/main/docs/implementation-path-2026.md Starts an LACP instance using a dmux-style fanout. This command is part of the parallel execution model, enabling standardized multi-instance flows with session isolation. ```bash lacp up ``` -------------------------------- ### Install LACP via Homebrew Source: https://github.com/0xnyk/lacp/blob/main/README.md Instructions for installing LACP using Homebrew, including tapping the repository and installing either the stable version or the latest from the main branch. ```bash brew tap 0xNyk/lacp brew install lacp # stable v0.3.0 brew install --HEAD lacp # or track main branch ``` -------------------------------- ### Install LACP via cURL Bootstrap Source: https://github.com/0xnyk/lacp/blob/main/README.md Instructions for bootstrapping LACP installation using cURL. Supports optional flags for specifying a reference, profile, and verification. ```bash curl -fsSL https://raw.githubusercontent.com/0xNyk/lacp/main/install.sh | bash curl -fsSL https://raw.githubusercontent.com/0xNyk/lacp/main/install.sh | bash -s -- \ --ref main \ --profile starter \ --with-verify true ``` -------------------------------- ### Automate LACP Tasks with launchd Source: https://github.com/0xnyk/lacp/blob/main/README.md Examples for bootstrapping and verifying automated background tasks using macOS launchd. These profiles handle repo synchronization and periodic brain expansion. ```bash launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.lacp.repo-research-sync.plist launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.lacp.brain-expand-6h.plist launchctl print gui/$(id -u)/com.lacp.repo-research-sync launchctl print gui/$(id -u)/com.lacp.brain-expand-6h ``` -------------------------------- ### Troubleshooting LACP Installation Source: https://github.com/0xnyk/lacp/blob/main/README.md Provides a command to resolve 'bootstrap failed missing script' errors by reinstalling LACP with the starter profile and forcing scaffolding. ```bash bin/lacp-install --profile starter --force-scaffold ``` -------------------------------- ### Start LACP Sessions Source: https://github.com/0xnyk/lacp/blob/main/README.md Commands to start LACP sessions with specified instances, commands, and optional session/layout configurations. These commands pipe output to 'jq' for JSON parsing. ```bash bin/lacp up --session dev --instances 3 --command "claude" --json | jq bin/lacp up --session dev --instances 1 --command "claude" --json | jq bin/lacp up --layout squad --brand acme --command "claude" --json | jq ``` -------------------------------- ### Clean Install and Smoke Test LACP Source: https://github.com/0xnyk/lacp/blob/main/docs/release-checklist.md Performs a clean installation of LACP using Homebrew and runs a basic smoke test to ensure it's functional. This includes uninstalling, tapping, installing, and checking the help command and doctor output. Requires 'brew' and 'jq'. ```bash brew uninstall lacp || true brew tap 0xNyk/lacp brew install lacp lacp --help lacp doctor --json | jq '.ok,.summary' ``` -------------------------------- ### Track Time with LACP Source: https://context7.com/0xnyk/lacp/llms.txt Manages monthly project/client session time tracking with directory splits and activity buckets. Commands include starting, stopping, checking active sessions, and generating monthly reports. ```bash # Start time tracking lacp time start --project "$(pwd)" --client acme --tags coding,testing --json | jq # Stop current session lacp time stop --json | jq # Check active session lacp time active --json | jq # Monthly report lacp time month --json | jq # Directory split rollups lacp time month --json | jq '.directory_split' # Activity bucket breakdown lacp time month --json | jq '.activity_buckets,.by_tag' ``` -------------------------------- ### Set Up LACP Remote Environment (E2B) Source: https://github.com/0xnyk/lacp/blob/main/README.md Configures the LACP remote environment using the E2B provider. This involves navigating to the LACP directory, running the remote setup command for E2B with a specified sandbox ID, and executing a remote smoke test. ```bash cd /path/to/lacp bin/lacp-remote-setup --provider e2b --e2b-sandbox-id "" bin/lacp-remote-smoke --provider e2b --json ``` -------------------------------- ### Adopt Local Wrappers Source: https://github.com/0xnyk/lacp/blob/main/README.md Installs reversible wrappers for existing agent commands, ensuring all invocations pass through LACP policy gates. ```bash lacp adopt-local --json | jq ``` -------------------------------- ### Set Up LACP Remote Environment (Daytona) Source: https://github.com/0xnyk/lacp/blob/main/README.md Configures the LACP remote environment using the Daytona provider. This involves navigating to the LACP directory, running the remote setup command for Daytona, logging into Daytona, and executing a remote smoke test. ```bash cd /path/to/lacp bin/lacp-remote-setup --provider daytona daytona login bin/lacp-remote-smoke --provider daytona --json ``` -------------------------------- ### Apply Stop Quality Gate Hook Source: https://context7.com/0xnyk/lacp/llms.txt Installs and configures the stop quality gate hook, which evaluates Claude's responses using a local LLM (Ollama) to prevent rationalization of incomplete work. Configuration is done via environment variables. ```bash # Hook is installed via claude-hooks apply-profile lacp claude-hooks apply-profile quality-gate-v2 --json | jq # Configuration via environment variables: export LACP_QUALITY_GATE_MODEL="llama3.1:8b" # Default model export LACP_QUALITY_GATE_TIMEOUT="25" # Timeout in seconds export LACP_QUALITY_GATE_URL="http://localhost:11434/api/chat" # Hook output format when blocking: # {"decision": "block", "reason": "You are rationalizing incomplete work..."} ``` -------------------------------- ### Interact with LACP Console Source: https://context7.com/0xnyk/lacp/llms.txt Starts an interactive LACP shell with slash commands for common operations. Supports running single commands via `--eval` and provides various slash commands for diagnostics, session management, orchestration, and more. ```bash # Start interactive console lacp console # Run single command and exit lacp console --eval "/doctor --json" | jq '.ok' # Example: run loop via console lacp console --eval "/loop safe-verify trusted-local-dev -- /bin/echo hello" ``` -------------------------------- ### Manage Canary Failures and Optimization Source: https://github.com/0xnyk/lacp/blob/main/docs/troubleshooting.md Checks canary health metrics and triggers automated optimization loops to resolve triage failures. Includes commands to prepare releases with auto-optimization enabled. ```bash bin/lacp canary --json | jq '.summary,.failures' bin/lacp canary-optimize --iterations 3 --hours 24 --json | jq bin/lacp release-prepare --quick --auto-optimize-on-fail --json | jq ``` -------------------------------- ### Verify SSH Execution Context Source: https://github.com/0xnyk/lacp/blob/main/docs/troubleshooting.md Commands to inspect session fingerprints and render context profiles to prevent execution drift. This ensures commands are targeted at the correct remote host. ```bash bin/lacp session-fingerprint bin/lacp context-profile render --profile ssh-prod --var REMOTE_HOST=prod-server --json | jq ``` -------------------------------- ### Standard LACP Verification Cycle Source: https://github.com/0xnyk/lacp/blob/main/docs/runbook.md Performs a standard verification cycle for the LACP system. This involves installing the system, optionally without auto-dependencies, and then running verification and testing commands. Expected outputs include benchmark and snapshot JSON paths, and benchmark log paths. ```bash cd /path/to/lacp bin/lacp install --profile starter bin/lacp install --profile starter --no-auto-deps bin/lacp verify --hours 24 bin/lacp test --quick bin/lacp test --isolated ``` -------------------------------- ### Auto-optimize LACP Claude Hooks Source: https://context7.com/0xnyk/lacp/llms.txt Automatically optimizes the Claude Code hooks based on the current setup. The JSON output is parsed using `jq`. ```bash # Auto-optimize based on current setup lacp claude-hooks optimize --json | jq ``` -------------------------------- ### Diagnose Resource Exhaustion Source: https://github.com/0xnyk/lacp/blob/main/docs/troubleshooting.md Commands to identify process limits and hanging agent sessions causing 'fork: Resource temporarily unavailable' errors. These commands inspect process counts and LACP system health. ```bash ulimit -u ps -Ao pid,ppid,comm | rg -E 'claude|codex|tmux|dmux' bin/lacp doctor --json | jq '.ok,.summary' ``` -------------------------------- ### Initialize LACP Context Template Source: https://github.com/0xnyk/lacp/blob/main/docs/implementation-path-2026.md Initializes a minimal context template for LACP. This command helps enforce a standardized and minimal set of context files, aiding in A/B comparison between no-context and minimal-context scenarios. ```bash lacp context init-template ``` -------------------------------- ### Manage agent sessions with LACP up Source: https://context7.com/0xnyk/lacp/llms.txt Launches multi-instance agent sessions using backends like dmux or tmux. Supports layout presets, custom context contracts, and isolated worktree environments. ```bash lacp up --session dev --instances 3 --command "claude" --json | jq lacp up --layout squad --brand acme --command "claude" --json | jq lacp up \ --session prod-check \ --instances 1 \ --command "claude" \ --context-contract '{"expected_host":"prod-host","expected_cwd_prefix":"/srv/app"}' \ --json | jq ``` -------------------------------- ### Run LACP Smoke Tests Source: https://github.com/0xnyk/lacp/blob/main/README.md Executes a series of smoke tests for the LACP project to verify installation and functionality. It includes commands for installing, quick testing, isolated testing, and checking status and doctor reports in JSON format. ```bash cd /path/to/lacp bin/lacp install --profile starter --with-verify bin/lacp test --quick bin/lacp test --isolated bin/lacp doctor --json | jq '.ok,.summary' bin/lacp status --json | jq ``` -------------------------------- ### Prepare for Release with LACP Source: https://context7.com/0xnyk/lacp/llms.txt Performs pre-live go/no-go discipline checks before a release. Supports various options for local-iterative profiles, full checks, canary baseline comparisons, skipping gates, and allowing external CI. ```bash # Quick release preparation with local-iterative profile lacp release-prepare --profile local-iterative --json | jq # Full release preparation lacp release-prepare --json | jq # With canary baseline comparison lacp release-prepare --since-clean-baseline --json | jq # Skip optional gates for faster iteration lacp release-prepare --quick --skip-cache-gate --skip-skill-audit-gate --json | jq # Allow external CI (when intentionally using GitHub Actions) lacp release-prepare --allow-external-ci --json | jq ``` -------------------------------- ### POST /context/minimize Source: https://github.com/0xnyk/lacp/blob/main/docs/implementation-path-2026.md Manages project context by auditing, minimizing, and performing regression analysis on context files. ```APIDOC ## POST /context/minimize ### Description Optimizes project context files to ensure minimal high-signal data is used for task execution. ### Method POST ### Endpoint /context/minimize ### Parameters #### Request Body - **repo-root** (string) - Required - The root directory of the repository. - **mode** (string) - Optional - Execution mode (e.g., 'audit', 'minimize'). ### Request Example { "repo-root": ".", "mode": "minimize" } ### Response #### Success Response (200) - **status** (string) - Execution status. - **diff** (object) - Changes applied to context files. #### Response Example { "status": "success", "diff": { "removed_lines": 42 } } ``` -------------------------------- ### Enforce SSH Context Contract Source: https://github.com/0xnyk/lacp/blob/main/docs/troubleshooting.md Executes a guarded task by injecting a session fingerprint and context contract. This prevents local path leakage during remote SSH operations. ```bash FP="$(bin/lacp session-fingerprint)" CTX="$(bin/lacp context-profile render --profile ssh-prod --var REMOTE_HOST=prod-server)" bin/lacp run --task "remote guarded run" --repo-trust trusted --context-contract "${CTX}" --session-fingerprint "${FP}" -- ssh -G deploy@prod-server ``` -------------------------------- ### Harness Execution Source: https://context7.com/0xnyk/lacp/llms.txt Executes and validates task plans using the harness system. ```APIDOC ## [CLI] lacp harness-run ### Description Executes validated task plans with support for dependency ordering and retries. ### Method CLI Command ### Parameters #### Query Parameters - **--tasks** (string) - Required - Path to JSON task file. - **--workdir** (string) - Required - Working directory for execution. ### Response #### Success Response (200) - **ok** (boolean) - Execution status. - **tasks_passed** (integer) - Count of successful tasks. ``` -------------------------------- ### Run LACP E2E Smoke Tests with Template Initialization Source: https://context7.com/0xnyk/lacp/llms.txt Initializes an E2E template and runs smoke tests using Playwright. It specifies the working directory and the command to execute. JSON output is parsed by `jq`. ```bash # Initialize e2e template and run smoke tests lacp e2e smoke \ --workdir . \ --init-template \ --command "npx playwright test --grep @smoke" \ --json | jq ``` -------------------------------- ### Run Smart-Contract E2E Smoke Tests with LACP Source: https://context7.com/0xnyk/lacp/llms.txt Executes smart-contract E2E smoke tests using a provided command, initializing a template, and setting the working directory. JSON output is processed by `jq`. ```bash # Smart-contract e2e smoke lacp contract-e2e smoke \ --workdir . \ --init-template \ --command "forge test -vv" \ --json | jq ``` -------------------------------- ### Prepare LACP Release Source: https://github.com/0xnyk/lacp/blob/main/docs/implementation-path-2026.md Prepares an LACP release. This command is part of the suggested weekly runbook and likely involves checks and configurations necessary before a release. ```bash lacp release-prepare --profile local-iterative --json ``` -------------------------------- ### Initialize LACP Brain Stack with GitNexus Source: https://context7.com/0xnyk/lacp/llms.txt Initializes the LACP brain stack, including GitNexus code intelligence. It uses `jq` for JSON output parsing. ```bash # Include GitNexus code intelligence lacp brain-stack init --with-gitnexus --json | jq ``` -------------------------------- ### Manage LACP Swarm Lifecycle Source: https://github.com/0xnyk/lacp/blob/main/docs/runbook.md Commands for initializing, planning, launching, updating, and visualizing the LACP swarm. These operations use a manifest file and output is parsed with `jq`. Dependencies include `jq` and a `swarm.json` manifest. ```bash bin/lacp swarm init --manifest ./swarm.json --json | jq bin/lacp swarm plan --manifest ./swarm.json --json | jq bin/lacp swarm launch --manifest ./swarm.json --json | jq bin/lacp swarm up --manifest ./swarm.json --json | jq bin/lacp swarm tui --manifest ./swarm.json --dry-run --json | jq bin/lacp swarm status --latest --json | jq ``` -------------------------------- ### Apply LACP Claude Hook Profile Source: https://github.com/0xnyk/lacp/blob/main/README.md Applies a specific hook profile to the Claude environment using the LACP CLI. This command installs a curated set of hooks to enforce quality and safety during Claude sessions. ```bash lacp claude-hooks apply-profile ``` -------------------------------- ### Run LACP Canary Evaluation Source: https://context7.com/0xnyk/lacp/llms.txt Evaluates the 7-day promotion readiness gate over retrieval benchmarks. The evaluation results, including metrics like hit rate and MRR, are provided in JSON format and parsed by `jq`. ```bash # Run canary evaluation lacp canary --json | jq ``` -------------------------------- ### Execute LACP Control Loops Source: https://context7.com/0xnyk/lacp/llms.txt Run deterministic control loops that follow an intent-execute-observe-adapt pattern. ```bash # Basic control loop lacp loop --task "trusted smoke" --repo-trust trusted --json -- /bin/echo hello ``` -------------------------------- ### Execute LACP Harness Task Plan Source: https://context7.com/0xnyk/lacp/llms.txt Executes a validated task plan with dependency ordering and loop retries, specifying a working directory. The execution results, including task totals and successes, are provided in JSON format and parsed by `jq`. ```bash # Execute task plan with workdir lacp harness-run --tasks ./tasks.json --workdir . --json | jq ``` -------------------------------- ### Run API E2E Smoke Tests with LACP Source: https://context7.com/0xnyk/lacp/llms.txt Runs API E2E smoke tests using a specified command, initializing a template and setting the working directory. JSON output is parsed by `jq`. ```bash # API/backend e2e smoke lacp api-e2e smoke \ --workdir . \ --init-template \ --command "npx schemathesis run --checks all" \ --json | jq ``` -------------------------------- ### Execute Tasks with LACP Run Source: https://context7.com/0xnyk/lacp/llms.txt Execute commands through policy-based routing, incorporating risk tiers, budget gates, and context contracts. ```bash # Simple trusted task execution lacp run --task "hello world" --repo-trust trusted -- echo "LACP is working" # With full routing options and JSON output lacp run \ --task "create local venv" \ --repo-trust trusted \ --internet false \ --external-code false \ --sensitive-data false \ --json \ -- python3 -m venv .venv # With context contract for mutating commands lacp run \ --task "safe migration prep" \ --repo-trust trusted \ --context-contract '{"expected_host":"my-host","expected_cwd_prefix":"'"$HOME"'/repos"}' \ -- mkdir -p /tmp/lacp-migration # With budget gate and cost estimation lacp run \ --task "expensive analysis" \ --repo-trust unknown \ --estimated-cost-usd 5.0 \ --confirm-budget true \ --json \ -- ./expensive-script.sh # Critical tier with explicit confirmation lacp run \ --task "production deploy" \ --repo-trust trusted \ --confirm-critical true \ --json \ -- ./deploy.sh # Dry-run to see routing decision without execution lacp run --task "test route" --repo-trust unknown --dry-run --json | jq '.route,.risk_tier,.reasons' ``` -------------------------------- ### POST /optimize-loop Source: https://github.com/0xnyk/lacp/blob/main/docs/implementation-path-2026.md Executes the weekly optimization loop to analyze benchmarks, context health, and generate improvement proposals. ```APIDOC ## POST /optimize-loop ### Description Runs the automated optimization cycle to improve project performance and deduplicate failure patterns. ### Method POST ### Endpoint /optimize-loop ### Parameters #### Request Body - **iterations** (integer) - Required - Number of optimization cycles. - **hours** (integer) - Required - Lookback window in hours. - **days** (integer) - Required - Lookback window in days. ### Request Example { "iterations": 2, "hours": 24, "days": 7 } ### Response #### Success Response (200) - **report** (object) - Summary of optimization findings. - **proposals** (array) - List of concrete improvement actions. #### Response Example { "report": { "status": "complete" }, "proposals": ["prune_unused_context", "update_rules"] } ``` -------------------------------- ### System Bootstrap and Verification Source: https://github.com/0xnyk/lacp/blob/main/README.md Initializes the LACP system with a specific profile and verifies the environment health. ```bash cd /path/to/lacp bin/lacp bootstrap-system --profile starter --with-verify bin/lacp-mode show bin/lacp-mode remote-enabled --ttl-min 30 bin/lacp-doctor bin/lacp-verify --hours 24 ``` -------------------------------- ### Initialize and Manage Memory Architecture Stack Source: https://github.com/0xnyk/lacp/blob/main/README.md Commands to initialize the 5-layer memory stack, including optional GitNexus integration for AST-level code intelligence. Supports auditing memory coverage and scaffolding missing project memory. ```bash bin/lacp brain-stack init --json | jq bin/lacp brain-stack status --json | jq bin/lacp brain-stack init --with-gitnexus --json | jq bin/lacp brain-stack audit --json | jq bin/lacp brain-stack scaffold-all --min-sessions 5 --json | jq ``` -------------------------------- ### Brain Stack Management Source: https://context7.com/0xnyk/lacp/llms.txt Commands for initializing, auditing, and scaffolding the brain-stack memory infrastructure. ```APIDOC ## [CLI] lacp brain-stack ### Description Manages the brain-stack memory infrastructure, including initialization, status checks, and project scaffolding. ### Method CLI Command ### Parameters #### Query Parameters - **--with-gitnexus** (flag) - Optional - Include GitNexus code intelligence during init. - **--min-sessions** (integer) - Optional - Minimum sessions required for scaffolding. - **--dry-run** (flag) - Optional - Preview scaffolding changes without applying. - **--json** (flag) - Required - Output results in JSON format. ### Response #### Success Response (200) - **status** (object) - Current stack configuration and initialization state. ### Response Example { "knowledge_graph": {"initialized": true, "vault": "~/obsidian/vault"}, "ingestion_pipeline": {"initialized": true} } ``` -------------------------------- ### Execute LACP Test Suite Source: https://github.com/0xnyk/lacp/blob/main/CLAUDE.md Commands to run the LACP test suite, supporting full, quick, isolated, and individual test execution modes. These scripts verify system integrity and policy compliance. ```bash # Full suite (~60 tests) bin/lacp-test # Quick suite (doctor + route policy) bin/lacp-test --quick # Isolated (temporary roots, no side effects) bin/lacp-test --isolated # Single test bash scripts/ci/test-.sh ``` -------------------------------- ### Run LACP Preflight Checks Source: https://github.com/0xnyk/lacp/blob/main/docs/implementation-path-2026.md Runs LACP preflight checks. This command enforces policy gating as part of the verification process, ensuring tasks are completed with verifiable evidence. ```bash lacp pr-preflight ``` -------------------------------- ### Run Canary Optimization Loop Source: https://context7.com/0xnyk/lacp/llms.txt Executes the LACP canary optimization loop for a specified number of iterations and duration. The output is piped to `jq` for JSON parsing. ```bash lacp canary-optimize --iterations 3 --hours 24 --json | jq ``` -------------------------------- ### Troubleshooting Resource Limits Source: https://github.com/0xnyk/lacp/blob/main/README.md Offers a command to check system limits and diagnose 'fork: Resource temporarily unavailable' errors. It suggests reducing concurrent jobs or increasing the `ulimit -u` value. ```bash bin/lacp doctor --check-limits --json | jq ``` -------------------------------- ### Verify GitHub Release Assets Source: https://github.com/0xnyk/lacp/blob/main/docs/release-checklist.md Optionally verifies the GitHub release assets by downloading them and checking their integrity against the SHA256SUMS file. Requires 'gh' CLI and 'shasum'. ```bash gh release view vX.Y.Z -R 0xNyk/lacp gh release download vX.Y.Z -R 0xNyk/lacp -D /tmp/lacp-release-check cd /tmp/lacp-release-check shasum -a 256 -c SHA256SUMS ``` -------------------------------- ### Execute Tasks with LACP Sandbox Adapter Source: https://github.com/0xnyk/lacp/blob/main/docs/runbook.md Runs tasks within a sandbox environment, supporting various configurations for trust, network access, and resource allocation. Includes options for dry-run and detailed input contracts. Outputs JSON when `--json` is used. ```bash cd /path/to/lacp # Trusted local execution bin/lacp-sandbox-run \ --task "run internal benchmark checks" \ --repo-trust trusted \ -- echo "trusted-local-ok" # Local sandbox route (falls back to direct if local runner unset) bin/lacp-sandbox-run \ --task "run third-party scraper on unknown repo" \ --repo-trust unknown \ --internet true \ --external-code true \ --input-contract '{"source":"operator","intent":"run scraper smoke","allowed_actions":["echo"],"denied_actions":["credential exfiltration"],"confidence":0.95}' \ --confirm-critical true \ -- echo "local-sandbox-ok" # Remote route dry-run (safe when remote runner is not configured yet) bin/lacp-sandbox-run \ --task "quant gpu backtest with long runtime" \ --cpu-heavy true \ --long-run true \ --estimated-cost-usd 3.5 \ --dry-run \ --json ``` -------------------------------- ### Run Context-Aware Sandbox Tasks Source: https://github.com/0xnyk/lacp/blob/main/README.md Executes a command within a sandbox while enforcing a context contract, such as host or directory restrictions. ```bash bin/lacp-sandbox-run \ --task "create local venv" \ --repo-trust trusted \ --context-contract '{"expected_host":"my-host","expected_cwd_prefix":"'"$HOME"'/repos"}' \ -- python3 -m venv .venv ``` -------------------------------- ### Run LACP Canary Evaluation with Custom Lookback Days Source: https://context7.com/0xnyk/lacp/llms.txt Runs the LACP canary evaluation with a custom lookback period specified in days. The JSON output with metrics is processed by `jq`. ```bash # Custom lookback days lacp canary --days 3 --json | jq ``` -------------------------------- ### Manage LACP Operating Modes Source: https://context7.com/0xnyk/lacp/llms.txt Switch between local-only and remote-enabled modes, including managing time-bound approval tokens for remote execution. ```bash # Show current mode lacp mode show --json | jq # Switch to local-only mode (revokes remote approval) lacp mode local-only --json | jq # Enable remote execution with 30-minute TTL approval lacp mode remote-enabled --ttl-min 30 --json | jq # Revoke remote approval without changing mode lacp mode revoke-approval --json | jq ``` -------------------------------- ### Execute LACP API End-to-End Tests Source: https://github.com/0xnyk/lacp/blob/main/docs/implementation-path-2026.md Executes LACP API end-to-end tests. This command provides machine-verifiable evidence for task completion, aligning with the verification default completion criterion. ```bash lacp api-e2e ... ``` -------------------------------- ### List LACP Worktrees Source: https://context7.com/0xnyk/lacp/llms.txt Lists all managed Git worktrees within the specified repository root. The output is in JSON format and processed by `jq`. ```bash # List all worktrees lacp worktree list --repo-root . --json | jq ``` -------------------------------- ### Worktree Management Source: https://context7.com/0xnyk/lacp/llms.txt Manages git worktree lifecycle for isolated agent environments. ```APIDOC ## [CLI] lacp worktree ### Description Handles creation, listing, and cleanup of git worktrees. ### Method CLI Command ### Parameters #### Query Parameters - **--repo-root** (string) - Required - Root path of the repository. - **--name** (string) - Optional - Name of the worktree. - **--max-age-hours** (integer) - Optional - Age threshold for garbage collection. ### Response #### Success Response (200) - **worktree** (string) - Path of the managed worktree. ``` -------------------------------- ### Optimize LACP Claude Hooks with Quality Gate Profile Source: https://context7.com/0xnyk/lacp/llms.txt Optimizes Claude Code hooks with a preference for the 'quality-gate-v2' profile. The JSON output is processed by `jq`. ```bash # Optimize with specific profile preference lacp claude-hooks optimize --profile quality-gate-v2 --json | jq ``` -------------------------------- ### Minimize LACP Context Source: https://github.com/0xnyk/lacp/blob/main/docs/implementation-path-2026.md Minimizes the LACP context. This command supports the target of enforcing minimal context files and performing A/B comparisons. ```bash lacp context minimize ``` -------------------------------- ### Evaluate LACP Canary Since Clean Baseline Source: https://context7.com/0xnyk/lacp/llms.txt Evaluates the LACP canary readiness gate since the last clean baseline was set. The JSON output, containing evaluation metrics, is parsed by `jq`. ```bash # Evaluate since clean baseline lacp canary --since-clean-baseline --json | jq ``` -------------------------------- ### Validate LACP Locally Source: https://github.com/0xnyk/lacp/blob/main/docs/release-checklist.md Runs local tests and prepares for release. It executes isolated tests, prepares release artifacts, and verifies the release. Requires the 'lacp' tool and 'jq'. ```bash cd /path/to/lacp bin/lacp-test --isolated bin/lacp release-prepare --quick --skip-cache-gate --skip-skill-audit-gate --json | jq bin/lacp release-verify --tag vX.Y.Z --quick --skip-cache-gate --skip-skill-audit-gate --json | jq ``` -------------------------------- ### LACP Orchestrator Live Execution with dmux Source: https://github.com/0xnyk/lacp/blob/main/docs/runbook.md Executes an LACP orchestrator command live using the dmux backend. This requires setting the LACP_DMUX_RUN_TEMPLATE environment variable to define the execution template for dmux. ```bash export LACP_DMUX_RUN_TEMPLATE='dmux run --session "{session}" --command "{command}"' bin/lacp orchestrate run \ --task "start dmux swarm live" \ --backend dmux \ --session "lacp-dmux-live" \ --command "codex --help" \ --repo-trust trusted ``` -------------------------------- ### Analyze LACP Swarm Reservation Collisions Source: https://github.com/0xnyk/lacp/blob/main/docs/implementation-path-2026.md Analyzes reservation collision in LACP swarm. This command supports the parallel execution model by identifying and managing potential conflicts in multi-instance flows. ```bash lacp swarm ``` -------------------------------- ### Orchestrate swarm workflows with LACP swarm Source: https://context7.com/0xnyk/lacp/llms.txt Handles complex multi-session swarm workflows including manifest initialization, collision detection, and session status reporting. Designed for large-scale agent collaboration and episode tracking. ```bash lacp swarm init --manifest ./swarm.json --json | jq lacp swarm plan --manifest ./swarm.json --json | jq lacp swarm launch --manifest ./swarm.json --json | jq lacp swarm status --latest --json | jq '.collaboration_summary' ``` -------------------------------- ### Execute tasks with LACP loop Source: https://context7.com/0xnyk/lacp/llms.txt Runs automated tasks with support for verification stages, canary deployments, and context profiles. It provides structured JSON output for integration into CI/CD pipelines or automated monitoring tools. ```bash lacp loop \ --task "implement feature X" \ --repo-trust trusted \ --with-verify \ --verify-hours 24 \ --with-canary \ --canary-days 7 \ --json \ -- npm test lacp loop \ --task "safe dev work" \ --context-profile local-dev \ --context-profile-var REMOTE_HOST=dev-server \ --json \ -- ./dev-script.sh lacp loop \ --task "risky change" \ --repo-trust trusted \ --with-canary \ --auto-rollback-on-fail \ --json \ -- ./risky-migration.sh ``` -------------------------------- ### Publish LACP Release Assets Source: https://github.com/0xnyk/lacp/blob/main/docs/release-checklist.md Publishes release assets for LACP from the local machine. This command builds the tarball, generates checksums, and creates/updates GitHub Release assets. Requires 'lacp' tool, 'gh' CLI, and 'jq'. ```bash cd /path/to/lacp bin/lacp release-publish \ --tag vX.Y.Z \ --quick \ --skip-cache-gate \ --skip-skill-audit-gate \ --json | jq ``` -------------------------------- ### Claude Hooks Source: https://context7.com/0xnyk/lacp/llms.txt Audits, repairs, and optimizes Claude Code hook configurations. ```APIDOC ## [CLI] lacp claude-hooks ### Description Manages Claude Code hooks and plugin configurations to ensure system stability and performance. ### Method CLI Command ### Parameters #### Query Parameters - **--profile** (string) - Optional - Specific profile to apply (e.g., minimal-stop, hardened-exec). ### Response #### Success Response (200) - **summary** (object) - Audit results including version drift and hook status. ``` -------------------------------- ### Manage LACP Worktree Lifecycle Source: https://github.com/0xnyk/lacp/blob/main/docs/implementation-path-2026.md Manages the lifecycle of LACP worktrees. This command is integral to the parallel execution model, ensuring standardized multi-instance flows. ```bash lacp worktree ``` -------------------------------- ### Worktree Lifecycle Management (JSON Output) Source: https://github.com/0xnyk/lacp/blob/main/README.md Provides commands for managing worktrees, including doctoring, creating, listing, and garbage collecting them. All commands output in JSON format for programmatic processing. The `gc` command allows specifying age limits and branch prefixes. ```bash bin/lacp worktree doctor --repo-root . --json | jq ``` ```bash bin/lacp worktree create --repo-root . --name "batch-a" --base HEAD --json | jq ``` ```bash bin/lacp worktree list --repo-root . --json | jq ``` ```bash bin/lacp worktree gc --repo-root . --max-age-hours 72 --managed-only true --branch-prefix "wt/" --dry-run --json | jq ``` -------------------------------- ### LACP Testing Commands Source: https://github.com/0xnyk/lacp/blob/main/README.md Provides various options for testing the LACP functionality. Includes a basic test, a quick test, and an isolated test. ```bash bin/lacp test ``` ```bash bin/lacp test --quick ``` ```bash bin/lacp test --isolated ``` -------------------------------- ### Run LACP Weekly Optimization Loop Source: https://github.com/0xnyk/lacp/blob/main/docs/implementation-path-2026.md Executes the LACP weekly optimization loop. This command closes the loop with benchmarks, context/lessons health checks, and concrete proposals for improvement. ```bash lacp optimize-loop --iterations 2 --hours 24 --days 7 --json ``` -------------------------------- ### Initialize memory stack with LACP brain-stack Source: https://context7.com/0xnyk/lacp/llms.txt Initializes the 5-layer memory stack for agent persistence, including session memory scaffolding and MCP (Model Context Protocol) wiring. ```bash lacp brain-stack init --json | jq ``` -------------------------------- ### Run LACP E2E Tests with Custom Flows File Source: https://context7.com/0xnyk/lacp/llms.txt Runs local Playwright-style E2E workflows using a custom flows file and generates an evidence manifest. The JSON output is processed by `jq`. ```bash # Run with custom flows file lacp e2e run \ --command "npx playwright test" \ --flows-file ./e2e-flows.json \ --manifest ./browser-evidence.json \ --json | jq ``` -------------------------------- ### Execute LACP End-to-End Tests Source: https://github.com/0xnyk/lacp/blob/main/docs/implementation-path-2026.md Executes LACP end-to-end tests. This command is part of the verification strategy, ensuring tasks are marked complete only with machine-verifiable evidence. ```bash lacp e2e ... ``` -------------------------------- ### Automate brain expansion with LACP brain-expand Source: https://context7.com/0xnyk/lacp/llms.txt Executes automated Obsidian brain expansion loops, including research materialization, session synchronization, and memory consolidation. Supports strict mode and custom lookback windows. ```bash lacp brain-expand --apply --json | jq lacp brain-expand --apply --activate --consolidate --json | jq lacp brain-expand --apply --strict --json | jq ``` -------------------------------- ### Ingest YouTube Video with LACP Brain Ingest Source: https://context7.com/0xnyk/lacp/llms.txt Ingests a YouTube video using `lacp brain-ingest` by providing the video URL. A title can be specified, and the ingestion is applied. JSON output is parsed with `jq`. ```bash # YouTube video ingestion lacp brain-ingest --url "https://youtube.com/watch?v=..." --title "Agent memory talk" --apply --json | jq ``` -------------------------------- ### Perform Auth Check on LACP E2E Evidence Manifest Source: https://context7.com/0xnyk/lacp/llms.txt Performs an authentication pattern check on the generated evidence manifest for LACP E2E tests. The results are output in JSON and parsed by `jq`. ```bash # Auth pattern check on evidence manifest lacp e2e auth-check --manifest ./browser-evidence.json --json | jq ``` -------------------------------- ### Manage LACP Worktrees Source: https://github.com/0xnyk/lacp/blob/main/README.md Commands for creating and listing worktrees within a repository. Requires specifying the repository root and optionally a worktree name and base commit. ```bash bin/lacp worktree create --repo-root . --name "feature-a" --base HEAD --json | jq bin/lacp worktree list --repo-root . --json | jq ``` -------------------------------- ### Generate Evidence for Merge/Release Source: https://github.com/0xnyk/lacp/blob/main/README.md Commands to generate evidence for different types of flows (browser/web, backend/API, smart-contract) before a merge or release. These commands use 'jq' for JSON output and may require specific work directories and command templates. ```bash bin/lacp e2e smoke --workdir . --init-template --command "npx playwright test --grep @smoke" --json | jq bin/lacp api-e2e smoke --workdir . --init-template --command "npx schemathesis run --checks all" --json | jq bin/lacp contract-e2e smoke --workdir . --init-template --command "forge test -vv" --json | jq ``` -------------------------------- ### Create New LACP Worktree Source: https://context7.com/0xnyk/lacp/llms.txt Creates a new Git worktree for isolated agent runs. This command requires the repository root, a name for the new worktree, and the base commit or branch. The output, including the worktree path and branch name, is in JSON and parsed by `jq`. ```bash # Create a new worktree lacp worktree create --repo-root . --name "feature-a" --base HEAD --json | jq ``` -------------------------------- ### Perform LACP Context Regression Testing Source: https://github.com/0xnyk/lacp/blob/main/docs/implementation-path-2026.md Performs regression testing on LACP context. It allows for comparison between a no-context JSON and a minimal-context JSON, aiding in verifying context changes. ```bash lacp context regression --none --minimal ``` -------------------------------- ### Apply Hardened Exec Profile to LACP Claude Hooks Source: https://context7.com/0xnyk/lacp/llms.txt Applies the 'hardened-exec' profile to the Claude Code hooks configuration. This command outputs JSON, which is then processed by `jq`. Available profiles include minimal-stop, balanced, hardened-exec, quality-gate-v2, session-start, pretool-guard, and write-validate. ```bash # Available profiles: minimal-stop, balanced, hardened-exec, quality-gate-v2, session-start, pretool-guard, write-validate lacp claude-hooks apply-profile hardened-exec --json | jq ``` -------------------------------- ### Batch Orchestration with LACP Source: https://github.com/0xnyk/lacp/blob/main/docs/runbook.md Executes a predefined batch of orchestration tasks defined in a JSON file. The output is piped to `jq` for JSON parsing. Requires a `orchestrate-batch.json` file. ```bash bin/lacp orchestrate run --batch ./orchestrate-batch.json --json | jq ``` -------------------------------- ### Configure LACP Sandbox Routing Source: https://github.com/0xnyk/lacp/blob/main/docs/runbook.md Defines routing for sandbox execution, specifying repository trust levels, internet access, and resource-intensive task parameters. Supports trusted, unknown, and remote sandbox configurations. Outputs JSON when `--json` is used. ```bash cd /path/to/lacp # Trusted local example bin/lacp-route --task "run memory benchmark on internal repo" --repo-trust trusted # Local sandbox example bin/lacp-route \ --task "run third-party scraper on unknown repo" \ --repo-trust unknown \ --internet true \ --external-code true # Remote sandbox example bin/lacp-route \ --task "quant gpu backtest with long runtime" \ --cpu-heavy true \ --long-run true \ --json ``` -------------------------------- ### Process JSON Output with jq Source: https://github.com/0xnyk/lacp/blob/main/docs/implementation-path-2026.md Processes JSON output from LACP commands using the `jq` utility. This is a common pattern in the suggested weekly runbook for parsing and inspecting JSON results. ```bash jq ``` -------------------------------- ### Orchestrate LACP Tasks and Swarms Source: https://github.com/0xnyk/lacp/blob/main/README.md Commands for orchestrating tasks and launching swarm instances. These commands utilize JSON output and are piped to 'jq' for processing. ```bash bin/lacp orchestrate run --task "parallel batch" --backend dmux --json | jq bin/lacp swarm launch --manifest ./swarm.json --json | jq ``` -------------------------------- ### Run LACP Diagnostics Source: https://context7.com/0xnyk/lacp/llms.txt Utilize the 'doctor' command to perform health checks, validate dependencies, check runtime limits, and auto-fix configuration issues. ```bash # Basic health check - returns ok: true if all checks pass lacp doctor --json | jq '.ok,.summary' # Full diagnostics with runtime pressure checks lacp doctor --check-limits --json | jq # With macOS system health (thermal, memory, Spotlight, Docker) lacp doctor --system --json | jq # With Obsidian brain ecosystem health lacp doctor --brain --json | jq # Auto-fix missing directories and clean stale files lacp doctor --fix # Get actionable remediation commands lacp doctor --check-limits --fix-hints --json | jq '.remediation_hints' # Auto-install missing dependencies (dry-run first) lacp doctor --fix-deps --auto-deps-dry-run --json | jq ``` -------------------------------- ### Daily Developer Workflow Commands Source: https://github.com/0xnyk/lacp/blob/main/README.md Standard commands for maintaining session health, setting operating modes, and executing work through LACP gates. ```bash # Health checks bin/lacp doctor --fix-hints bin/lacp system-health --fix-hints bin/lacp status --json | jq # Operating modes bin/lacp mode local-only bin/lacp mode remote-enabled --ttl-min 30 # Execution bin/lacp run --task "trusted smoke" --repo-trust trusted -- /bin/echo hello bin/lacp loop --task "implement feature X" --repo-trust trusted --json -- ``` -------------------------------- ### Apply Minimal Stop Profile to LACP Claude Hooks Source: https://context7.com/0xnyk/lacp/llms.txt Applies a specific profile, 'minimal-stop', to the Claude Code hooks configuration. The operation's result is output in JSON and parsed by `jq`. ```bash # Apply a specific profile lacp claude-hooks apply-profile minimal-stop --json | jq ``` -------------------------------- ### Set up Daytona Runner for LACP Remote Execution Source: https://github.com/0xnyk/lacp/blob/main/docs/runbook.md Configures LACP to use Daytona as a remote execution provider. This involves setting up the provider, logging into Daytona, and performing a remote smoke test. A subsequent command shows how to run a task using the configured remote runner. ```bash cd /path/to/lacp bin/lacp-remote-setup --provider daytona daytona login bin/lacp-remote-smoke --provider daytona --json # Run a task using the remote runner bin/lacp-sandbox-run \ --task "quant gpu backtest with long runtime" \ --cpu-heavy true \ --long-run true \ -- python3 -V ``` -------------------------------- ### Execute LACP Contract End-to-End Tests Source: https://github.com/0xnyk/lacp/blob/main/docs/implementation-path-2026.md Executes LACP contract end-to-end tests. This command ensures that tasks are only marked as done when machine-verifiable evidence is available. ```bash lacp contract-e2e ... ``` -------------------------------- ### Validate LACP Harness Task Plan Source: https://context7.com/0xnyk/lacp/llms.txt Validates a task plan defined in a JSON file against harness contracts. The validation result is output in JSON and parsed by `jq`. ```bash # Validate a task plan against harness contracts lacp harness-validate --tasks ./tasks.json --json | jq ``` -------------------------------- ### Orchestrate Dry-Run with DMUX Backend Source: https://github.com/0xnyk/lacp/blob/main/README.md Executes an orchestration task in dry-run mode using the DMUX backend. This allows previewing the task without making actual changes. It requires specifying the task name, backend, session, command, and repository trust level. ```bash bin/lacp orchestrate run \ --task "parallel coding swarm kickoff" \ --backend dmux \ --session "lacp-swarm" \ --command "echo hello" \ --repo-trust trusted \ --dry-run ``` -------------------------------- ### Configure LACP Zero-External Mode Source: https://github.com/0xnyk/lacp/blob/main/docs/runbook.md Sets LACP to 'Zero-External Mode' by modifying the `.env` file. This mode blocks live remote execution by default, enhancing security. It still classifies remote tasks and allows `--dry-run` checks. ```bash cd /path/to/lacp echo 'LACP_ALLOW_EXTERNAL_REMOTE="false"' >> .env ```