unlazy
Completion discipline for substantial AI-agent work, backed by runnable gates.
Write the acceptance ledger first. Execute reviewed checks. Reverify returned work. Report only what the evidence supports.
Quick start | Gate contract | Orchestration | Security | Research
Version status
The current source targets 2.1.0. It is not identified here as a tagged GitHub release. Pin an exact commit when you need an immutable installation. See CHANGELOG.md for the unreleased change set.
Install
Use the skills CLI for supported agents:
npx skills add Leonxlnx/unlazy
Add -g for a user-level install or --all for every detected agent.
Manual locations:
Claude Code: ~/.claude/skills/unlazy
Codex CLI: ~/.codex/skills/unlazy
Clone the repository into the relevant directory. Invoke it as /unlazy where slash skills are supported, $unlazy in Codex, or by a natural-language trigger from the skill description.
The core is SKILL.md. The checker and optional hook require Node 16 or newer and use no third-party runtime packages.
Quick start
Ask for substantial work with an explicit trigger:
/unlazy tree 5 refactor the payment module and verify every migration path
For a solo task, copy templates/gates-leaf.md to GATES.md, replace every placeholder, and inspect it without executing commands:
node <path-to-skill>/scripts/gate-check.mjs --status GATES.md
--status is the only mode that is always non-executing. On a new oracle with no exact approval record, a normal run prints its resolved command, expectation, working directory, shell, and PATH without executing it:
node <path-to-skill>/scripts/gate-check.mjs GATES.md
Do not treat normal mode as a permanent dry run: once the exact oracle is approved, normal mode can execute it.
CHECK: lines are shell code. After reading every command and called script, approve and run the ledger:
node <path-to-skill>/scripts/gate-check.mjs --approve GATES.md
Re-run all runnable gates, including gates already marked complete:
node <path-to-skill>/scripts/gate-check.mjs --reverify GATES.md
Use --help for the complete current CLI.
The gate contract
# Gates: pricing behavior
- [ ] G1: pricing fixtures render the expected tiers
CHECK: node scripts/verify-pricing.mjs
EXPECT: pricing verification passed
EVIDENCE: pending
- [ ] G2: checkout integration succeeds from its package
CHECK: node scripts/verify-checkout.mjs
EXPECT: checkout verification passed
CWD: packages/checkout
EVIDENCE: pending
A runnable gate passes only when its process exits 0 and EXPECT: matches combined output. Both the captured stdout/stderr payload and the canonical UTF-8 combined string used by EXPECT: and its fingerprint must fit the 1 MiB limit; the checker never truncates a larger matcher string into success. Canonical automatic evidence begins with a versioned full SHA-256 digest of the parsed CHECK:, EXPECT:, and raw CWD: definition, followed by the exit and successful-output fingerprint before capped environment details. A checked runnable gate with missing, ordinary prose, legacy, malformed, or definition-mismatched evidence is stale and unmet. Existing manual gates with ordinary human evidence remain compatible. This unkeyed binding detects structural drift, not ledger tampering: anyone who can edit a ledger can forge canonical-looking evidence. --status and Stop detect definition drift without resolving a shell or executing a check, but old evidence is not re-execution; parent verification uses --reverify.
The parser rejects zero-gate ledgers, duplicate ids, incomplete runnable gates, invalid expectations, and abandonment with a missing reason or unknown gate id. It ignores fenced examples, preserves CRLF or LF when updating, and inserts a missing evidence line when needed. A valid abandonment is terminal handoff rather than success: the checker exits 1 with HANDOFF REQUIRED, and Stop allows exit while reporting qualified ids.
The checker can prove only the command oracle you declare. It cannot infer that an English title and arbitrary shell code mean the same thing. Good gates therefore:
- read the artifact or service named by the outcome
- print a success-only marker after all assertions pass
- test an absence check against a known positive control
- measure supplied figures instead of copying them into
EXPECT: - review consequential manual outcomes with evidence proportional to risk
Use the advisory, non-executing scripts/gate-lint.mjs to catch mechanically weak ledger patterns; add --strict when warnings should fail. Full specification: references/gates.md.
Shell and PATH
The checker uses --shell first, then UNLAZY_SHELL, then Node's platform default shell. That default is /bin/sh on Unix and process.env.ComSpec on Windows with the platform fallback. Checks inherit the launch environment, including PATH.
This matters on Windows: a checker launched from Git Bash can see Unix-like tools that the same checker launched from PowerShell does not. --shell changes the interpreter; it does not install grep, tail, tr, or other external programs. Portable examples call repository-owned Node scripts.
Parent re-verification should use the same declared shell and required toolchain. A shell or PATH mismatch is a failed verification to resolve, not successful evidence.
Security boundary
Approval records live under ~/.unlazy/approved by default. UNLAZY_APPROVAL_DIR may select another owner-private real directory, but its canonical target must remain outside the checked repository. Symlinked stores and linked, replaced, or non-private records fail closed. Each record is specific to the absolute ledger and gate, exact CHECK: and EXPECT:, resolved CWD: and shell, timeout, output and regex limits, regex worker limits, platform, and full inherited PATH. Editing any bound input requires approval again.
Approval is consent, not a sandbox. Approval storage is a canonical, owner-private directory outside the repository; records are accepted only as single-link private regular files. The environment-independent definition digest is separate from the runtime approval identity, which also binds resolved ledger/runtime context. Approval does not hash called scripts, fixtures, dependencies, or other transitive inputs. --status and Stop validate the recorded definition binding but do not inspect those artifacts; reinspect changed dependencies and run --reverify. See SECURITY.md for the bounded digest pattern when user-designed dependency identity is needed. Checks run with ambient filesystem, environment, credential, and network access. Scopes and ownership leases coordinate cooperating processes but do not restrict what a process can read or write.
Orchestration and parallel work
For work that needs fresh contexts, create one scoped pipeline under .unlazy//:
.unlazy/<scope>/PLAN.md
.unlazy/<scope>/GATES.md
.unlazy/<scope>/gates/leaf-*.md
.unlazy/<scope>/gates/node-*.md
The driver rereads the current request and maintains a revisioned contract inventory that maps each independently required outcome or acceptance-changing constraint to an owner and observation. It fixes interfaces, dependencies, conventions, and file ownership before dispatch. Leaves use declared WAITING, READY, IN-FLIGHT, VERIFIED, or ABANDONED states. Branches use OPEN, VERIFIED, or ABANDONED.
Ready leaves may run together only after each declares complete, disjoint, repository-relative OWNS: paths and claims them:
node <path-to-skill>/scripts/gate-check.mjs --scope api --leaf leaf-1.2.1 --claim
Lease matching is conservative and may reject a safe-looking pair. It is a coordination guard, not write isolation. Use separate worktrees for colliding worktree-local output, and configure separate cache locations when cache writes can conflict.
Dispatch is rolling: when a verified leaf unblocks another, start the newly ready leaf without waiting for unrelated work. Gate checks remain sequential by default. --jobs , where N is an integer from 1 through 64, is an opt-in rolling limit for independent checks and keeps reporting in ledger order.
For every independent READY set, open a native launch wave, record each host agent handle, and seal before the first wait. If a partial launch cannot recover, use the audited abandon --reason transition; never invent a handle or delete state. Read references/method.md, references/orchestration.md, [references/dispat