# Show HN: Human0 – A template to run an autonomous, self-improving code loop

> Source: <https://github.com/human0-ai/template>
> Published: 2026-07-17 02:55:10+00:00

Describe a change. Claude Code ships it. You barely touch it.

[human0.ai](https://human0.ai/open-source) ·
[the reviewer action](https://github.com/human0-ai/code-review)

Fork this template and your repo runs on a self-driving loop.

You say what you want — in plain language, from your laptop or your phone. Claude Code does the rest. It researches the code. It makes the change. It writes the docs. It opens a pull request.

Then an AI reviewer checks the work. If something's off, the agent fixes it and tries again. It loops on its own until the review passes. Then it merges.

You step in twice: to say what you want, and to say "go."

What you get out of the box:

— your rules, read by every agent on every run. Write them once.`AGENTS.md`

/`CLAUDE.md`

**An AI reviewer**— checks every PR, comments inline, gives one verdict:** APPROVE**or** REQUEST_CHANGES**.** An autonomous workflow**— open a draft PR, watch the preview, say "go." The agent clears the review and the PR merges itself.

Built for Claude Code, including Claude Code on the web. The reviewer and rules
work with Codex or any agent too. It's the same setup that runs
[human0](https://human0.ai) itself — every commit reviewed and merged by AI.

Why we build this way: [Why AI Agents Should Be Defined as
Code](https://human0.ai/blog/why-ai-agents-should-be-defined-as-code/).

If you just want the AI reviewer on your current project, you don't need to fork
anything. Add a credential and one workflow file — full steps in the
[code-review action README](https://github.com/human0-ai/code-review#set-it-up).

Use this repo as a template (the green **Use this template** button), then:

**Add a credential.** In**Settings → Secrets and variables → Actions**, add one of:`ANTHROPIC_API_KEY`

— an[Anthropic API key](https://console.anthropic.com/), or`CLAUDE_CODE_OAUTH_TOKEN`

— a Claude.ai OAuth token (`claude setup-token`

).

**Edit** to describe your project — its structure and rules.`AGENTS.md`

**Review**— this is your reviewer's instructions. Tailor it to your project before you start relying on it.`docs/ai-review.md`

**Open a pull request.** The reviewer runs on the next push.

To let an approval merge on its own, enable **auto-merge** and require the AI
review in your branch protection settings.

For the reviewer to **approve** PRs (which is what lets an approval auto-merge),
GitHub must allow Actions to approve pull requests:

**Settings → Actions → General → Workflow permissions** → enable
**"Allow GitHub Actions to create and approve pull requests."**

In an organization this is often locked at the org level — set it under
**Organization → Settings → Actions → General** instead. You don't need the
"Read and write" default token permission; the workflow already requests the
write scopes it needs.

| Path | What it's for |
|---|---|
`AGENTS.md` |
Guidelines agents read every run. `CLAUDE.md` is a symlink to it. |
`docs/ai-review.md` |
The reviewer's prompt — edit it to change how the reviewer behaves. |
`.github/workflows/ai-review.yml` |
Runs the reviewer on every PR. |
`.github/workflows/task-gate.yml` |
Holds an agent's PR until its linked task is independently approved. |

The reviewer checks the diff; the [task gate](https://github.com/human0-ai/task-gate)
checks the work was signed off by someone who didn't do it. It's a CI check that
stays red until an agent's PR links a Human0 task that's been **independently**
approved, so self-approved work can't merge. It only gates the Human0 app's
PRs — human PRs pass through.

There's nothing to configure — no secret, no env. Just mark `task-gate`

a
required status check so a red gate blocks the merge. If you're not running the
Human0 platform, delete `task-gate.yml`

— the reviewer stands on its own.

The reviewer is just a prompt plus your `AGENTS.md`

. To change the bar, tone, or
project-specific rules, edit `docs/ai-review.md`

. To teach it your conventions
without touching the prompt, write them in `AGENTS.md`

— it reads that on every
run.

Apache 2.0 — see [LICENSE](/human0-ai/template/blob/main/LICENSE).
