Vibe fast. Ship with proof.
WorktreeProof is an open-source toolkit for scoped, evidence-backed AI coding-agent work. It gives agents a beginning (plan), a safe working surface (reserve), bounded checks (run), and a verifiable end (close with a receipt). Local-first, model-agnostic, zero runtime dependencies.
git clone https://github.com/Nedal7707/worktree-proof.git
cd worktree-proof
npm ci
node bin/worktree-proof.js doctor --json
node bin/worktree-proof.js plan docs-refresh --scope docs/ --json
node bin/worktree-proof.js reserve docs-refresh --scope docs/ --json
node bin/worktree-proof.js run docs-refresh --json -- node --version
node bin/worktree-proof.js status --jsonclose consumes an explicit JSON receipt; it never invents terminal evidence. For a complete, disposable run that closes an abandoned demo lane, see the reproducible demo.
The 0.4.0 tag can also be installed globally from GitHub:
npm install --global github:Nedal7707/worktree-proof#v0.4.0
worktree-proof --versionUse the portable Agent Skill:
- Codex: Open the WorktreeProof Stack skill — Codex will ask to confirm.
- Claude Code: Copy
skills/worktree-proof-stackinto your.claude/skills/directory.
Both clients use the same .worktree-proof/ state and schemas; neither client invokes the other.
Three OpenCode plugins are included for agent automation:
# Install all into the current user's OpenCode global config
npm run opencode:plugins:install
# Restart OpenCode after installation.Drive the user's normal Chrome via the Chrome Bridge extension relay
(chrome_connect endpoint http://127.0.0.1:9333 — extension ID
epppjbfmmabiphlgeokdichnhhklabep; the 9222 debug-port "Chrome portal" is
retired for browser automation and port 9222 is Token-Free Gateway only).
These are agent tools, not slash commands:
chrome_connect
chrome_navigate
chrome_click
chrome_fill
chrome_screenshot
chrome_extract
chrome_waitHuman-like OS automation (Windows/macOS/Linux via nut-js). These are agent tools:
computer_screenshot
computer_mouse_click
computer_keyboard_type
computer_keyboard_press
computer_window_focus
computer_waitStructured agent workflow:
/goal Add user auth
/plan JWT login, role guards, tests pass
/task start task-1
/task done task-1
/reviewState persists in .opencode/goal-plan.json.
- Lane IDs & file scopes — normalized and checked for overlap
- Reservations — serialized with bounded leases and stale-state detection
- Commands — executed without an implicit shell; output bounded and redacted
- Closure receipts — JSON-safe, validate terminal evidence
- Tool probes — declarative, probe-only; no installers or arbitrary shell
- Resource scans — read-only; conservative concurrency/cleanup recommendations
- Codex↔Claude bridge — bounded local task/status/result handoffs; non-overlapping scopes; never forwards hidden context
- Task awareness — hashes host IDs, discards private content, reports mode only when explicitly provided
worktree-proof tools list
worktree-proof tools scan --json
worktree-proof tools recommend --goal testing --goal javascript
worktree-proof resources scan --json
worktree-proof resources plan --allowed-root .cache --allowed-root build
worktree-proof recipes list
worktree-proof recipes show docs
worktree-proof init preview --target generic-prompt
worktree-proof bridge inbox --agent codex --json
worktree-proof tasks inspect --input host-snapshot.json --jsoninit apply requires --confirm, refuses collisions and path escapes, and never overwrites an existing file. resources plan is an inventory only. The public helper request defaults to 8 and supports an explicit request up to 24, but the host/runtime ceiling and CPU/RAM/disk safety can reduce the effective value to zero.
The CLI keeps plans, leases, run records, and closure receipts under the project's .worktree-proof/ directory. Scope normalization and lease checks are local and deterministic; no coordinator or account is required. A command selected by the user runs as an argv array, then a bounded/redacted run record can be inspected with status. close validates a caller-supplied receipt against the closure schema, and validate checks the resulting state without mutating it. The bridge, task awareness, manifests, and MCP stdio surface are optional adapters around this same local state. See ARCHITECTURE.md for boundaries and THREAT-MODEL.md for what the checks do not prove.
skills/— concise, portable Agent Skillsrecipes/— bounded examples for common maintenance workcatalog/— declarative tool manifestsschemas/— lane, receipt, recipe, resource, and skill-source contractsbenchmarks/— no-dependency, local benchmark harness with reproducibility notes indocs/benchmarks/evals/— seeded, fail-closed scenario harness for the CLI guaranteessite/— static, tracker-free overview at nedal7707.github.io/worktree-proofdocs/— deep docs: architecture, threat model, cross-agent compatibility, bridge, task awareness, release checklist, privacy, benchmarksintegrations/— vendored OpenCode plugins:opencode-plugin-chrome-use— CDP-based Chrome automation (navigate, click, fill, screenshot, extract, wait, tabs, evaluate)opencode-plugin-computer-use— OS automation via nut-js (screenshot, mouse, keyboard, key combos, window management)opencode-plugin-goal-plan— Goal/Plan workflow modes (/goal:set,/plan:create,/task:next,/review:gate)
State stays in the project directory; no telemetry or runtime dependency. Do not put credentials in command arguments, environment dumps, receipts, or issue reports. Read SECURITY.md and docs/PRIVACY.md before using integrations. WorktreeProof does not authenticate users, replace code review, prove an external deployment, or guarantee that an AI-generated change is safe.
For crash-risk reduction, resources scan and resources plan provide bounded diagnostics, backpressure recommendations, and recovery-oriented cleanup inventory. They do not change OS settings, kill processes, delete files, run a daemon, or promise to prevent crashes. If you inspect a crash dump or .heapsnapshot, treat it as potentially containing conversations or credentials and keep it private; this project never uploads or shares it.
- SUPPORT.md — what belongs in a public issue; how to provide a redacted reproduction
- GOVERNANCE.md — maintainer decision process; CODE_OF_CONDUCT.md applies to participation
- ROADMAP.md — intentionally small, evidence-gated next steps (a plan, not a promise)
- docs/benchmarks/README.md — local benchmark runs; numbers are machine-specific, not vendor comparisons
Run npm test, npm run check, and the release checklist before proposing a focused change. See CONTRIBUTING.md, docs/CROSS-AGENT-COMPATIBILITY.md, docs/BRIDGE.md, docs/TASK-AWARENESS.md, and docs/RELEASE-CHECKLIST.md.
WorktreeProof is an unofficial community project and is not affiliated with, endorsed by, or sponsored by any vendor. It is released under the Apache License 2.0.
- Evals harness: 9 seeded fail-closed checks (all pass);
evals/run.js+test/evals.test.js+test/benchmarks.test.js - Benchmark dedup: removed stale
docs/benchmarks/run.mjs; single runner atbenchmarks/run.js - Package scripts: added
npm run evalandnpm run benchmark - CI green: Node 20/22 × ubuntu/windows, Publish static site, CodeQL
- Clean-install verified: fresh
npm install worktree-proof@0.4.0on Node 20/22/24 → full lifecycleplan→reserve→run→close→release→validate→valid:true, receipts:1 - SBOM + SHA256SUMS + release manifest + provenance per release
- Worktree Proof Workflow V3 installed (CW-3/CW-4): immutable task contracts, SAFE-3 circuit breaker, fixed terminal ledger, exact cleanup, crash recovery rehydration
- Spec audit:
WORKFLOW_SPEC.md+HELPER_POLICY.mdverified withscripts/spec-audit.mjs(§§1–10 present) safe-parallel-delegationskill codified with lane ID, file scope, capacity, allocation rules
- Core CLI: plan, reserve, run, close, release, validate, doctor, status, init, tools, resources, recipes, bridge, tasks
- Local-first worktrees, bounded leases, closure receipts, resource scans
- Agent Skills, Codex/Claude bridge, MCP stdio surface
- GitHub Actions: CI, CodeQL, Dependency Review, Pages, Release Integrity
- npm publishing with provenance, SBOM, checksums