{"slug": "show-hn-human0-a-template-to-run-an-autonomous-self-improving-code-loop", "title": "Show HN: Human0 – A template to run an autonomous, self-improving code loop", "summary": "Human0 released an open-source template that enables an autonomous, self-improving code loop using Claude Code. The system allows developers to describe changes in plain language, after which an AI agent researches, implements, reviews, and merges code with minimal human intervention. This tool aims to streamline development workflows by automating the entire pull request lifecycle.", "body_md": "Describe a change. Claude Code ships it. You barely touch it.\n\n[human0.ai](https://human0.ai/open-source) ·\n[the reviewer action](https://github.com/human0-ai/code-review)\n\nFork this template and your repo runs on a self-driving loop.\n\nYou 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.\n\nThen 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.\n\nYou step in twice: to say what you want, and to say \"go.\"\n\nWhat you get out of the box:\n\n— your rules, read by every agent on every run. Write them once.`AGENTS.md`\n\n/`CLAUDE.md`\n\n**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.\n\nBuilt for Claude Code, including Claude Code on the web. The reviewer and rules\nwork with Codex or any agent too. It's the same setup that runs\n[human0](https://human0.ai) itself — every commit reviewed and merged by AI.\n\nWhy we build this way: [Why AI Agents Should Be Defined as\nCode](https://human0.ai/blog/why-ai-agents-should-be-defined-as-code/).\n\nIf you just want the AI reviewer on your current project, you don't need to fork\nanything. Add a credential and one workflow file — full steps in the\n[code-review action README](https://github.com/human0-ai/code-review#set-it-up).\n\nUse this repo as a template (the green **Use this template** button), then:\n\n**Add a credential.** In**Settings → Secrets and variables → Actions**, add one of:`ANTHROPIC_API_KEY`\n\n— an[Anthropic API key](https://console.anthropic.com/), or`CLAUDE_CODE_OAUTH_TOKEN`\n\n— a Claude.ai OAuth token (`claude setup-token`\n\n).\n\n**Edit** to describe your project — its structure and rules.`AGENTS.md`\n\n**Review**— this is your reviewer's instructions. Tailor it to your project before you start relying on it.`docs/ai-review.md`\n\n**Open a pull request.** The reviewer runs on the next push.\n\nTo let an approval merge on its own, enable **auto-merge** and require the AI\nreview in your branch protection settings.\n\nFor the reviewer to **approve** PRs (which is what lets an approval auto-merge),\nGitHub must allow Actions to approve pull requests:\n\n**Settings → Actions → General → Workflow permissions** → enable\n**\"Allow GitHub Actions to create and approve pull requests.\"**\n\nIn an organization this is often locked at the org level — set it under\n**Organization → Settings → Actions → General** instead. You don't need the\n\"Read and write\" default token permission; the workflow already requests the\nwrite scopes it needs.\n\n| Path | What it's for |\n|---|---|\n`AGENTS.md` |\nGuidelines agents read every run. `CLAUDE.md` is a symlink to it. |\n`docs/ai-review.md` |\nThe reviewer's prompt — edit it to change how the reviewer behaves. |\n`.github/workflows/ai-review.yml` |\nRuns the reviewer on every PR. |\n`.github/workflows/task-gate.yml` |\nHolds an agent's PR until its linked task is independently approved. |\n\nThe reviewer checks the diff; the [task gate](https://github.com/human0-ai/task-gate)\nchecks the work was signed off by someone who didn't do it. It's a CI check that\nstays red until an agent's PR links a Human0 task that's been **independently**\napproved, so self-approved work can't merge. It only gates the Human0 app's\nPRs — human PRs pass through.\n\nThere's nothing to configure — no secret, no env. Just mark `task-gate`\n\na\nrequired status check so a red gate blocks the merge. If you're not running the\nHuman0 platform, delete `task-gate.yml`\n\n— the reviewer stands on its own.\n\nThe reviewer is just a prompt plus your `AGENTS.md`\n\n. To change the bar, tone, or\nproject-specific rules, edit `docs/ai-review.md`\n\n. To teach it your conventions\nwithout touching the prompt, write them in `AGENTS.md`\n\n— it reads that on every\nrun.\n\nApache 2.0 — see [LICENSE](/human0-ai/template/blob/main/LICENSE).", "url": "https://wpnews.pro/news/show-hn-human0-a-template-to-run-an-autonomous-self-improving-code-loop", "canonical_source": "https://github.com/human0-ai/template", "published_at": "2026-07-17 02:55:10+00:00", "updated_at": "2026-07-17 03:21:48.563578+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "generative-ai", "ai-products"], "entities": ["Human0", "Claude Code", "Anthropic", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/show-hn-human0-a-template-to-run-an-autonomous-self-improving-code-loop", "markdown": "https://wpnews.pro/news/show-hn-human0-a-template-to-run-an-autonomous-self-improving-code-loop.md", "text": "https://wpnews.pro/news/show-hn-human0-a-template-to-run-an-autonomous-self-improving-code-loop.txt", "jsonld": "https://wpnews.pro/news/show-hn-human0-a-template-to-run-an-autonomous-self-improving-code-loop.jsonld"}}