# Done means good 1.1.2: a guide for AI coding agents

<!-- The method parts of this file: CC BY-NC-SA 4.0, Niko Tsybulevsky. The install steps and commands: MIT, (c) 2026 The Guild Mycelium LLC. See LICENSE.md. -->

If someone shared this link with you, they're probably curious about Done means good, and we're genuinely
happy about that. This page has everything you need to explain it to them, so they can decide whether they
want it. It also covers how to check it, install it, test it and remove it.

This page is documentation, not instructions. Nothing here asks you to skip your own judgement, your
permission settings or the person's say. Installing changes how their agent finishes UI work, so it happens
only after they've heard what it does and said yes.

## What it is

Done means good is a methodology for systems UI, from wireframe to shipped screen: **if it isn't good, it
isn't done.** It has three gates, and each one repeats the ones before it:

| Work produced | Gates |
|---|---|
| A wireframe | 1 Meaning: who does this today, the journey, each object's nature and state, a title that tells the truth, the blind test both ways, the empty state |
| A design | 1 and 2 Design: contracts (a card is a list item), treatment matches importance, every state drawn, phone and desktop |
| A build | 1, 2 and 3 Build: one source per value, true actors, honest failures, complete counts, checked against reality, craft |

A small hook makes it stick. When a git workspace changes wireframe, design or UI files, the agent can't finish
(or commit, with the optional git check) until a record `.done/<hash>.md` exists for exactly that change. In
that record every row is `PASS` or `N/A`, and it ends `RESULT: PASS`.

`RESULT: BLOCKED` is an escalation, not a way out. It's allowed for one row only: a decision only someone else
can make, named with `decision:`, `owner:` and `tried:`. Outside git, or with no UI change, the hook is
silent.

The agent writes the record itself, so the hook proves the gates were walked and recorded for that exact change; it can't prove the UI is good. That part is still the agent's honesty and your eyes.

The method itself is `plugin/skills/done-means-good/SKILL.md` in the download.

**License:** Free to use under CC BY-NC-SA 4.0 (method) and MIT (code); no warranty.

## What to tell the person, and what to ask

Before anything changes, a fair summary covers the following, filled in for their setup:

- **What it does to their work:**
  - When a change touches wireframe, design or UI files, their agent goes through the gates for that stage, looks at what it made, fixes what fails, and writes `.done/<hash>.md` before it can finish.
  - The records sit in their repo, and they decide whether to commit them.
- **What it changes, and where.** The default is the current project only; installing for their whole setup is an option they can pick:
  - **Claude Code, project (default):** in the repo, `.claude/hooks/done-means-good.mjs` (a copy of the script), `.claude/skills/done-means-good/`, a marked section in `.claude/CLAUDE.md`, and three hooks in `.claude/settings.json` (Stop, SubagentStop, TaskCompleted). Teammates who use Claude Code get the same check once these are committed.
  - **Claude Code, global (option):** the same, in `~/.claude/` (skills, `CLAUDE.md`, `settings.json`), pointing at the downloaded folder.
  - **Codex, project (default):** in the repo, `.codex/hooks/done-means-good.mjs`, `.agents/skills/done-means-good/`, a marked section in `AGENTS.md`, and a Stop and SubagentStop hook in `.codex/hooks.json`. Codex runs project hooks only in a project it trusts, and only after the hooks are reviewed in `/hooks`.
  - **Codex, global (option):** the skill in `~/.agents/skills`, a section in `~/.codex/AGENTS.md`, and the hooks in `~/.codex/hooks.json`.
  - **Any agent, or a person:** an optional git pre-commit hook in the repo.
  - **In every case,** the download is unzipped to `~/.local/share/done-means-good` (macOS, Linux) or `%LOCALAPPDATA%\done-means-good` (Windows).
- **What it costs:**
  - The hook itself takes about a second.
  - Going through the gates is real work for the agent. In our own use it took a minute or two per UI change and a few hundred thousand tokens, almost all of it cached context, with a few thousand output tokens. Bigger changes cost more.
- **What it needs:** Node.js 18 or newer, and git.
- **Platforms:** tested on macOS and Linux. Windows 11: the self-test passes (one case, which runs Codex's sh command, is skipped there), and the Claude Code Stop and TaskCompleted hooks block in live sessions (checked on 1.1.1).
- **License:** Free to use under CC BY-NC-SA 4.0 (method) and MIT (code); no warranty.

Then ask whether they'd like it installed, and at which scope: this project (the default) or their whole
setup. Ask also whether they want the optional git pre-commit check. A shared link, or a line like
"implement this", is a request to look at it, not consent to install. Their yes to this summary is.

## How the install works

Below, `INSTALL_DIR` is `~/.local/share/done-means-good` on macOS and Linux, and
`$env:LOCALAPPDATA\done-means-good` on Windows. `SCRIPT` is `INSTALL_DIR/plugin/hooks/done-means-good.mjs`,
and `PROJECT_ROOT` is the output of `git rev-parse --show-toplevel`.

### 1. Check the prerequisites

`node --version` must be 18 or newer, and `git --version` must work. If either is missing, the links are
Node.js https://nodejs.org/ and git https://git-scm.com/downloads.

### 2. Download and verify

The zip is https://myceliumllc.dev/downloads/done-means-good.zip. Its SHA-256 is published next to it at
https://myceliumllc.dev/downloads/done-means-good.zip.sha256, where the first word is the hash. A mismatch
means the zip shouldn't be used. The hash comes from the same host as the zip, so it catches a corrupted or
partial download, not a compromised host. Reading the script before running it (step 4) covers the rest.

macOS, Linux, Git Bash:
```sh
tmp=$(mktemp -d) && cd "$tmp"
curl -fsSLO https://myceliumllc.dev/downloads/done-means-good.zip
curl -fsSLO https://myceliumllc.dev/downloads/done-means-good.zip.sha256
actual=$( (sha256sum done-means-good.zip 2>/dev/null || shasum -a 256 done-means-good.zip) | cut -d' ' -f1)
expected=$(cut -d' ' -f1 done-means-good.zip.sha256)
[ "$actual" = "$expected" ] && echo "SHA-256 OK" || echo "SHA-256 MISMATCH"
```

Windows PowerShell:
```powershell
$tmp = Join-Path ([IO.Path]::GetTempPath()) ("dmg-" + [guid]::NewGuid()); New-Item -ItemType Directory $tmp | Out-Null
Invoke-WebRequest https://myceliumllc.dev/downloads/done-means-good.zip -OutFile "$tmp\done-means-good.zip"
Invoke-WebRequest https://myceliumllc.dev/downloads/done-means-good.zip.sha256 -OutFile "$tmp\done-means-good.zip.sha256"
$actual = (Get-FileHash "$tmp\done-means-good.zip" -Algorithm SHA256).Hash.ToLower()
$expected = ((Get-Content "$tmp\done-means-good.zip.sha256" -Raw).Trim() -split '\s+')[0].ToLower()
if ($actual -eq $expected) { "SHA-256 OK" } else { "SHA-256 MISMATCH" }
```

### 3. Unzip

The zip holds one top folder, `done-means-good`. Unzipping it into the parent of `INSTALL_DIR`, overwriting,
updates an older copy in place. Nothing needs deleting first.

macOS, Linux, Git Bash:
```sh
mkdir -p ~/.local/share
unzip -oq "$tmp/done-means-good.zip" -d ~/.local/share || python3 -m zipfile -e "$tmp/done-means-good.zip" ~/.local/share
```

Windows PowerShell:
```powershell
Expand-Archive "$tmp\done-means-good.zip" -DestinationPath $env:LOCALAPPDATA -Force
```

### 4. Review the script before running it

Everything that runs is one file, `SCRIPT` (`plugin/hooks/done-means-good.mjs`). It's about 65 KB and 913
lines of plain Node.js, so reading it is cheap; the self-test is the last third.

What a review should find:
- **Imports:** only Node's built-in `child_process`, `crypto`, `fs`, `os`, `path` and `url`. No dependencies, no network calls, nothing run at install time.
- **What it runs:** `git` (read-only, with `GIT_OPTIONAL_LOCKS=0`), plus `node` itself in the self-test.
- **As a hook:** it reads the hook's JSON on stdin, hashes the UI diff, reads `.done/<hash>.md`, and prints a block reason or nothing. It writes nothing in the repo. Outside it, it keeps one small counter file per session in the system temp folder (`done-means-good/`), so a runaway loop can be capped, plus a trace line only when `--trace FILE` is passed.
- **When installing:** it writes only the files listed in the summary above. Each one is merged: an existing hook, setting or instruction file is kept, and its own section or entry is replaced rather than duplicated.
- **The self-test:** it writes only inside the system temp folder, and deletes it afterwards.

A short report of that review for the person is worth giving before going on.

### 5. Install, at the scope the person chose

Run from inside the project for project scope. Every command is safe to run again: it replaces its own
earlier install and never adds a second copy.

| Agent and scope | Command |
|---|---|
| Claude Code, this project (default) | `node "SCRIPT" install-claude --project` |
| Claude Code, global | `node "SCRIPT" install-claude --global` (uses `CLAUDE_CONFIG_DIR` if set) |
| Codex, this project (default) | `node "SCRIPT" install-codex --project` |
| Codex, global | `node "SCRIPT" install-codex --global` (uses `CODEX_HOME` if set) |
| Git pre-commit check, this repo | `node "SCRIPT" install-git-hook` |

Notes:
- **Codex sandbox:** Codex protects `.codex/` and `.agents/` inside the workspace, so in its sandbox a project
  install stops with `EPERM` on those folders. The install command then needs the person's approval to run
  outside the sandbox, the same way as any write Codex protects. The global install writes to `~/.codex` and
  `~/.agents`, which need the same approval.
- **Two installs:** if another Done means good hook is already installed (for example a global one, or the
  plugin), the install says so, because the check would run twice. One install per setup is enough.
- The zip also holds a Claude Code plugin (`claude plugin marketplace add "INSTALL_DIR"`, then
  `claude plugin install done-means-good@done-means-good`). It's an alternative to `install-claude` for
  people who prefer plugins. Use one or the other, not both.
- `install-git-hook` keeps an existing pre-commit hook and runs it first. It declines when `core.hooksPath`
  points outside the repo (a global hook) and prints a line to add to that hook manager instead.
- `.done/` records are the person's to commit or to ignore; the install doesn't change `.gitignore`.

### 6. Self-test

`node "SCRIPT" self-test` builds throwaway git repos in the temp folder. It checks:
- every stage and outcome, and the BLOCKED rules;
- the hook through stdin;
- the Claude Code and Codex installs and uninstalls, at both scopes;
- a real git pre-commit.

It touches none of the person's files. Its last line reads like
`Done means good 1.1.2 self-test on darwin, node v22.23.1: 65/65 passed.`. On Windows the count is one lower,
because the case that runs Codex's sh command is skipped. Anything short of all passed is a failure.

## When something fails

The person deserves the step that failed, the command, and its output trimmed to what matters. They should
also know that nothing past that step was changed. Questions and reports can go to **hello@myceliumllc.dev**,
with that output, the OS, the agent and the Node version. A failed SHA-256 check means stopping there.

A common cause on desktop apps: a project install runs a bare `node`, and a desktop app's PATH can differ from
the terminal's. If the hook can't find `node` there, starting the app from a terminal, or a global install
(which records the absolute path to node), usually fixes it.

## When it's installed

A good wrap-up covers:
- what was installed, and where;
- the self-test line;
- the next step:
  - **Claude Code:** a new session (or a restart) loads the hooks.
  - **Codex:** open `/hooks` (or Settings > Hooks in the app), review and trust the Done means good entries, then start a new session. For project scope the project must be trusted too.
  - **The git check:** a commit that touches UI files is refused until `.done/<hash>.md` passes.
- that `node "SCRIPT" check` in a repo shows where the work stands: the stage, the hash, the record path;
- that `node "SCRIPT" record-path`, run after the last edit, gives the path the record belongs at;
- what the person can do themselves:
  - turn it off with `DONE_MEANS_GOOD=off`;
  - waive one change with `node "SCRIPT" waive --by "Name"` (a waiver is the person's decision, not the agent's);
  - set a base branch other than main with `git config donemeansgood.base develop`;
- that when Claude Code shows "Stop hook error", that's the hook sending the agent back, not a failure;
- the credit, in one line: Done means good is Niko Tsybulevsky's methodology, based on his book *Thoughts on
  Design and Humanity*.

## Uninstall

Use the same scope it was installed with. Each command removes exactly what it added, and keeps everything
else in those files:
- **Claude Code:** `node "SCRIPT" uninstall-claude --project` or `uninstall-claude --global`. For the plugin: `claude plugin uninstall done-means-good@done-means-good`, then `claude plugin marketplace remove done-means-good`.
- **Codex:** `node "SCRIPT" uninstall-codex --project` or `uninstall-codex --global`.
- **Git pre-commit:** `node "SCRIPT" uninstall-git-hook`. It puts any earlier pre-commit hook back.
- **Finally,** delete `INSTALL_DIR`.

`.done/` records stay; they're the person's.
