From e0e4c16f43733b741c1a5aea73af953a93c56bf2 Mon Sep 17 00:00:00 2001 From: angelcodes95 Date: Wed, 4 Nov 2026 08:59:45 -0800 Subject: [PATCH 1/4] docs: correct how Claude Code finds AGENTS.md Claude Code now reads AGENTS.md natively, so "reads CLAUDE.md, not AGENTS.md" was false. The @AGENTS.md import step stays: native reading only applies when no CLAUDE.md or CLAUDE.local.md exists. Agent-Context: {"why":"Checked against Anthropic's memory docs rather than secondary articles: native AGENTS.md reading needs v2.1.277+, is skipped whenever any CLAUDE.md or CLAUDE.local.md exists, and was off before v2.1.281 in some sessions (Bedrock, telemetry disabled). Dropping the import step would silently stop Claude Code reading the block in any repo that has or later adds a CLAUDE.md, so init's behavior is unchanged and only the explanation was rewritten.","touches":["README.md"]} --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 71b645c..ba5a35d 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Tell your agent to "agent-commit" your changes. If it already knows the format ( 1. It searches for "agent-commit format." 2. It finds this page. 3. It adds the block below to this repo's `AGENTS.md`, creating one if it doesn't exist yet. Most agents (Cursor, OpenCode, Codex, and others) read `AGENTS.md` natively, so this one file and this one step covers most cases. -4. If it's Claude Code specifically: Claude Code reads `CLAUDE.md`, not `AGENTS.md`, so it also adds a single `@AGENTS.md` line to `CLAUDE.md` (creating a one-line `CLAUDE.md` if none exists yet), which is Anthropic's own documented way to point Claude Code at an existing `AGENTS.md`. A symlink (`ln -s AGENTS.md CLAUDE.md`) works too if there's no other Claude-specific content to keep separate. +4. If it's Claude Code specifically: it also adds a single `@AGENTS.md` line to `CLAUDE.md` (creating a one-line `CLAUDE.md` if none exists yet). Claude Code v2.1.277 and later reads `AGENTS.md` on its own, but by default only when there's no `CLAUDE.md` (or `CLAUDE.local.md`) in the working directory or above it; once one exists, `AGENTS.md` is ignored unless imported. The import is Anthropic's documented way to use both, and it also covers older versions and sessions that read `CLAUDE.md` only. Claude Code skips an `AGENTS.md` it has already loaded, so it's never read twice. A symlink (`ln -s AGENTS.md CLAUDE.md`) also works if there's no Claude-specific content to keep separate, except on Windows. See [Claude Code's memory docs](https://code.claude.com/docs/en/memory). 5. It commits that setup change on its own, separately from whatever the user actually asked it to commit, since it's a one-time repo setup step, not part of the requested change. If anything about the repo's commit conventions or the user's own instructions makes an unprompted commit inappropriate, it asks first instead. 6. It writes the requested commit: a normal `git commit`, nothing installed, nothing downloaded. From b4a5be2cef94fe6594934e38f2edbc6e45170ad7 Mon Sep 17 00:00:00 2001 From: angelcodes95 Date: Wed, 4 Nov 2026 08:59:45 -0800 Subject: [PATCH 2/4] docs: stop claiming check detects a stale AGENTS.md block Only init reads the block's version marker; check inspects commit trailers and never looks at AGENTS.md. Agent-Context: {"why":"Verified in cli/src: the format-version marker is only parsed in init.ts; check.ts has no notion of it. The claim had also been repeated when planning the 0.3 format bump, so correcting it here keeps that plan honest: init --update is the one path that notices and replaces an old block.","touches":["README.md"]} --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ba5a35d..771e14c 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Tell your agent to "agent-commit" your changes. If it already knows the format ( The block's core content never changes, only which file it ends up in; the appendix at the bottom of the block only applies if your repo squash-merges or runs commitlint, most do, but check rather than assume. Every commit after the first one in that repo is free, since the instructions are now sitting locally where the agent already looks. -If the `agent-commit` CLI is installed, steps 3 and 4 are `agent-commit init`: it writes the exact current block (the same one below, with a version marker so a later `init` or `check` can tell if a repo's copy has gone stale), links `CLAUDE.md` unless `--no-claude-code` is passed, and refuses to touch an existing, unrelated commit-message convention or clobber an already-set-up repo, both cases have to be confirmed explicitly (`--force`, `--update`). Hand-transcribing the block from this page still works and needs nothing installed; `init` just removes the chance of a transcription drifting from what's actually documented here. +If the `agent-commit` CLI is installed, steps 3 and 4 are `agent-commit init`: it writes the exact current block (the same one below, with a version marker so a later `init` can tell if a repo's copy has gone stale and `init --update` can replace it), links `CLAUDE.md` unless `--no-claude-code` is passed, and refuses to touch an existing, unrelated commit-message convention or clobber an already-set-up repo, both cases have to be confirmed explicitly (`--force`, `--update`). Hand-transcribing the block from this page still works and needs nothing installed; `init` just removes the chance of a transcription drifting from what's actually documented here. ### The block to add to `AGENTS.md` From d3d892e6292648d2fc140888ba2240af8f4cb5f7 Mon Sep 17 00:00:00 2001 From: angelcodes95 Date: Wed, 4 Nov 2026 08:59:56 -0800 Subject: [PATCH 3/4] ci: fix stale reason for building the check from source The comment said the CLI wasn't on npm yet. It is; building from source is still correct because this repo should check its own unreleased code. Agent-Context: {"why":"Considered switching the step to npx agent-commit@latest now that 0.1.0 is published, rejected because it would run the previous release against every push, so a regression in check itself would never show up in this repo's own CI.","touches":[".github/workflows/agent-commit-check.yml"]} --- .github/workflows/agent-commit-check.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/agent-commit-check.yml b/.github/workflows/agent-commit-check.yml index 22f1d64..9d556d6 100644 --- a/.github/workflows/agent-commit-check.yml +++ b/.github/workflows/agent-commit-check.yml @@ -19,9 +19,9 @@ jobs: with: node-version: 20 - # This repo isn't published to npm yet, so the workflow builds the CLI - # from source. An adopting repo using the published package would - # instead run: npx agent-commit@latest check + # Builds the CLI from source on purpose: this repo is the CLI, so the + # check should run the code that just landed, not the last release. + # An adopting repo would instead run: npx agent-commit@latest check - name: Build agent-commit CLI from source working-directory: cli run: | From b904fb5a5411bfabb070669bf0011f9b9505d4b2 Mon Sep 17 00:00:00 2001 From: angelcodes95 Date: Wed, 4 Nov 2026 09:00:13 -0800 Subject: [PATCH 4/4] docs(changelog): file shipped entries under 0.1.0 Everything listed under Unreleased went out in the 0.1.0 npm publish, so it now has its own dated section, plus Keep a Changelog compare links. Agent-Context: {"why":"npm records the published commit (gitHead 3437716), and git log 3437716..main touches only README.md, so every Unreleased entry predates the publish and none had to be split out. The compare links point at v0.1.0, tagged locally on 3437716 in the same pass; they 404 until that tag is pushed.","touches":["CHANGELOG.md"]} --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e15d28..367f0aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,11 @@ All notable changes to this project are documented here. Format follows to the format itself (see `SPEC.md` for the format's own, separately tracked version). -## Unreleased +## [Unreleased] + +## [0.1.0] - 2026-09-11 + +First published release. ### Added @@ -170,3 +174,6 @@ version). return value is inserted literally; added regression tests covering this and the other special replacement sequences (`$&`, `$$`, `` $' ``, `$9`). + +[Unreleased]: https://github.com/AngelCodes95/agent-commit/compare/v0.1.0...HEAD +[0.1.0]: https://github.com/AngelCodes95/agent-commit/releases/tag/v0.1.0