# Completion Gates for Agents

Writes acceptance gates and re-verifies evidence before reporting long autonomous work done.

- Repository: https://github.com/Leonxlnx/unlazy (4245 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-09-03
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Leonxlnx/unlazy --skill unlazy -g -a claude-code -y`
Codex: `npx skills add Leonxlnx/unlazy --skill unlazy -g -a codex -y`
Cursor: `npx skills add Leonxlnx/unlazy --skill unlazy -g -a cursor -y`
Gemini CLI: `npx skills add Leonxlnx/unlazy --skill unlazy -g -a gemini-cli -y`

## Description

Enforces completion discipline for substantial autonomous work by writing acceptance gates before execution, decomposing work with the Depth Tree, running approved checks, and re-verifying evidence before reporting. Use when an agent faces a long or multi-part task, work that has returned half-done, an exhaustive audit or build, parallel leaves or pipelines, or explicit triggers such as /unlazy, $unlazy, "tree N", "gates", and "do not stop until it is done".

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Unlazy

Make incomplete work visible and make completion testable. Prove outcomes against a ledger instead of relying on a confident done report.

## Write gates before real work

For solo work, create `GATES.md` from the local file `templates/gates-leaf.md` before implementing (orchestrated mode instead starts from `templates/PLAN.md` plus per-leaf `templates/gates-leaf.md` and per-branch `templates/gates-node.md` under `.unlazy/<scope>/`; see Build the Depth Tree below). State one observable outcome per gate. Give every runnable gate an indented `CHECK:` and `EXPECT:`; use a manual gate only when no command can decide the outcome.

Throughout this file, `<skill-dir>` is the directory containing this `SKILL.md` and `<scope>` is a pipeline id under `.unlazy/`.

Treat `CHECK:` as code. Before executing an inherited ledger, parse it without running anything and read every command and called script:

```text
node <skill-dir>/scripts/gate-check.mjs --status GATES.md
```

Approve only commands you wrote or understand, then run them explicitly:

```text
node <skill-dir>/scripts/gate-check.mjs --approve GATES.md
```

When an oracle has no existing approval, a normal run prints `CHECK:`, `EXPECT:`, resolved `CWD:`, resolved shell, and `PATH`, then leaves that command unexecuted. Approvals live under `~/.unlazy/approved` by default. They bind the ledger, gate, command, expectation, resolved working directory and shell, timeout, output and regex limits, platform, and full inherited `PATH`. Changing any bound input requires approval again. Read the local `SECURITY.md` before running checks from an untrusted repository.

The rest: https://github.com/Leonxlnx/unlazy/blob/HEAD//SKILL.md
