From b3c8c0fc7c9d140ff594e0e079f3bdf05183a625 Mon Sep 17 00:00:00 2001 From: Aiatulla Date: Sat, 17 Oct 2026 13:25:05 +0600 Subject: [PATCH 1/4] docs(readme): add how-it-works workflow and header badges Co-Authored-By: Claude Opus 5.5 --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/README.md b/README.md index 0a141c1..210d1f2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,18 @@ +
+ # agent-kit +**One kit that makes your AI coding agents plan first, follow your rules, and prove their work.** + +[![verify](https://github.com/Aiatulla/agent-kit/actions/workflows/verify.yml/badge.svg)](https://github.com/Aiatulla/agent-kit/actions/workflows/verify.yml) +![Claude Code](https://img.shields.io/badge/Claude_Code-supported-d97757) +![Gemini CLI](https://img.shields.io/badge/Gemini_CLI-supported-4285f4) +![bash](https://img.shields.io/badge/deps-bash%20%C2%B7%20git%20%C2%B7%20jq-555) + +[How it works](#how-it-works) · [How it differs](#how-it-differs) · [Install](#install) · [Use it in a project](#use-it-in-a-project) · [Extend](#extend-the-kit) + +
+ One repo that gives your AI coding agents the same rules, commands, reviewer, hooks, and skills on every machine. It supports Claude Code and Gemini CLI today, and a new tool is one adapter file. @@ -11,6 +24,44 @@ The kit has three tiers: Dependencies: bash (3.2 or newer), git, jq. macOS and Linux. +## How it works + +AI agents are fast but tend to guess, skip steps, and "fix" failing tests by changing the tests. +agent-kit gives every task the same path, the way a careful engineering team works: + +```mermaid +flowchart LR + A["/spec
agree on what"] --> B["/plan
agree on how"] + B --> C["/implement
one step at a time"] + C --> D["reviewer
checks the diff"] + D -->|pass| E["merge"] + D -->|fail| C + C -.->|something went wrong| F["/lesson
fix the cause"] +``` + +1. **Spec: agree on what to build.** + `/spec ` makes the agent interview you one question at a time until the goal is clear. + It writes `docs/specs/NNN-name.md` with the goal, what is out of scope, and testable acceptance criteria, plus a plain-language summary you can send to a customer. + No code is written yet. +2. **Plan: agree on how to build it.** + `/plan docs/specs/NNN-name.md` makes the agent read the code first, then write a plan: the approach, existing code to reuse, files to change, small checkbox steps, the tests, and the risks. + You read it and approve it before anything changes. +3. **Implement: one small step at a time.** + `/implement docs/plans/NNN-name.md` does one step, runs the checks, ticks the box, and commits. + If the plan turns out to be wrong, the agent stops and asks instead of improvising. +4. **Guardrails: run automatically while the agent works.** + Edits to tests, snapshots, and fixtures are blocked, so the agent has to fix the code, not the test. + `scripts/verify.sh` runs after every edit and again before the agent may finish. + After 3 failed checks in a row, the agent must stop and explain instead of trying forever. +5. **Review: a second agent checks the work.** + The `reviewer` agent did not write the code and assumes it has bugs. + It checks the diff against the spec and plan: every requirement built and tested, nothing extra added, nothing duplicated, no weakened checks, no security gaps. + It ends with `VERDICT: PASS` or `VERDICT: FAIL`. +6. **Lesson: learn from mistakes.** + When something goes wrong, `/lesson` records what happened and why, and proposes the smallest mechanical fix (a lint rule, a test, a hook) so it cannot happen again. + +The same rules, commands, and checks apply on every machine and in every tool, so switching between Claude Code and Gemini CLI changes nothing about how the work gets done. + ## How it differs Most agent kits are frameworks for building new agents. From 723480cca5bd145a2719f1593f5ae24f884e0b5c Mon Sep 17 00:00:00 2001 From: Aiatulla Date: Sat, 17 Oct 2026 13:29:47 +0600 Subject: [PATCH 2/4] chore: add MIT license Co-Authored-By: Claude Opus 5.5 --- LICENSE | 21 +++++++++++++++++++++ README.md | 5 +++++ 2 files changed, 26 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..dc19f64 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Aiatulla + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 210d1f2..84d55e2 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ [![verify](https://github.com/Aiatulla/agent-kit/actions/workflows/verify.yml/badge.svg)](https://github.com/Aiatulla/agent-kit/actions/workflows/verify.yml) ![Claude Code](https://img.shields.io/badge/Claude_Code-supported-d97757) ![Gemini CLI](https://img.shields.io/badge/Gemini_CLI-supported-4285f4) +[![license](https://img.shields.io/badge/license-MIT-green)](LICENSE) ![bash](https://img.shields.io/badge/deps-bash%20%C2%B7%20git%20%C2%B7%20jq-555) [How it works](#how-it-works) · [How it differs](#how-it-differs) · [Install](#install) · [Use it in a project](#use-it-in-a-project) · [Extend](#extend-the-kit) @@ -138,3 +139,7 @@ Run `scripts/verify.sh full` before committing; `AGENTS.md` has the rules for wo ``` This removes only links that point into the kit and the kit's hooks from `settings.json`, then restores your backed-up files. + +## License + +MIT, see [LICENSE](LICENSE). From af451a9e02ed82f943b4b25a65f0936919c4ff77 Mon Sep 17 00:00:00 2001 From: Aiatulla Date: Sat, 17 Oct 2026 13:32:55 +0600 Subject: [PATCH 3/4] docs(readme): match workflow claims to actual hook and tool behavior Co-Authored-By: Claude Opus 5.5 --- README.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 84d55e2..2df3cdf 100644 --- a/README.md +++ b/README.md @@ -50,10 +50,10 @@ flowchart LR 3. **Implement: one small step at a time.** `/implement docs/plans/NNN-name.md` does one step, runs the checks, ticks the box, and commits. If the plan turns out to be wrong, the agent stops and asks instead of improvising. -4. **Guardrails: run automatically while the agent works.** - Edits to tests, snapshots, and fixtures are blocked, so the agent has to fix the code, not the test. +4. **Guardrails: run automatically while the agent works** (Claude Code, in projects set up with `kit sync`). + The agent's file-edit tools cannot change tests, snapshots, or fixtures (unless you set `ALLOW_TEST_EDITS=1`), so it has to fix the code, not the test. `scripts/verify.sh` runs after every edit and again before the agent may finish. - After 3 failed checks in a row, the agent must stop and explain instead of trying forever. + After the same check fails 3 times in a session, the hook tells the agent to stop and report instead of trying again. 5. **Review: a second agent checks the work.** The `reviewer` agent did not write the code and assumes it has bugs. It checks the diff against the spec and plan: every requirement built and tested, nothing extra added, nothing duplicated, no weakened checks, no security gaps. @@ -61,20 +61,21 @@ flowchart LR 6. **Lesson: learn from mistakes.** When something goes wrong, `/lesson` records what happened and why, and proposes the smallest mechanical fix (a lint rule, a test, a hook) so it cannot happen again. -The same rules, commands, and checks apply on every machine and in every tool, so switching between Claude Code and Gemini CLI changes nothing about how the work gets done. +Rules, commands, and skills are shared by Claude Code and Gemini CLI on every machine. +The guardrail hooks and the reviewer agent are Claude Code only for now; in Gemini CLI, the pre-commit hook from `kit sync` still runs `scripts/verify.sh fast` on every commit. ## How it differs -Most agent kits are frameworks for building new agents. -agent-kit is not: it configures the AI coding agents you already use, and keeps them honest. +agent-kit is not a framework for building new agents. +It configures the AI coding agents you already use, and keeps them honest. - **Tool-agnostic**: one source of rules, commands, and skills for Claude Code and Gemini CLI; a new tool is one adapter file. -- **Guardrails that run, not just prompts**: hooks block edits to tests, snapshots, and fixtures, run `scripts/verify.sh` after edits and before the agent stops, and enforce a stop rule after 3 failed checks. +- **Guardrails that run, not just prompts** (Claude Code): hooks block file-tool edits to tests, snapshots, and fixtures, run `scripts/verify.sh` after edits and before the agent stops, and tell the agent to stop after 3 failed checks. - **Stack-aware**: per-directory stacks (`nextjs`, `fastapi`) bring their own rules, lint presets, and checks, so a monorepo gets the right rules in each folder. - **Spec-driven workflow**: `/spec`, `/plan`, `/implement`, and `/lesson` commands plus a reviewer agent that checks each diff against its spec and plan. -- **Safe and reversible install**: symlinks into the clone, backups before anything is replaced, merged `settings.json`, idempotent reruns, and a clean `--uninstall`. -- **Committed output**: `kit sync` writes plain files into the project, so teammates and CI need nothing installed. -- **No runtime**: bash, git, and jq only; no Node, Python, or package manager. +- **Safe and reversible install**: symlinks (or generated files) into the clone, backups before anything is replaced, merged `settings.json`, idempotent reruns, and a clean `--uninstall`. +- **Committed output**: `kit sync` writes plain files into the project, so CI needs nothing installed. +- **No runtime**: the kit itself needs only bash, git, and jq; no Node, Python, or package manager. ## Install @@ -112,7 +113,7 @@ Create `.agent-kit.json` at the project root, mapping each directory to its stac Then run `kit sync` in the project. It copies the stacks into `.agent-kit/stacks/`, writes each stack's rules into that directory's `AGENTS.md` between `agent-kit` markers (your own content outside the markers is kept), writes `docs/inventory/.md`, generates `scripts/verify.sh`, installs a pre-commit hook that runs `scripts/verify.sh fast`, and records the kit version. -Commit the result: teammates and CI need nothing else installed. +Commit the result: CI needs nothing else installed, and teammates run `kit sync` to get the pre-commit hook (and `install.sh` for the agent guardrails). It prints the one line to add to your ESLint or Ruff config to extend the stack's preset. The file `.agent-kit.json` also turns on the global hooks for that project: From a03ad865e652924cb3112463d1c9749574931b53 Mon Sep 17 00:00:00 2001 From: Aiatulla Date: Sat, 17 Oct 2026 13:34:21 +0600 Subject: [PATCH 4/4] docs(readme): apply review nits on workflow wording Co-Authored-By: Claude Opus 5.5 --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2df3cdf..ed0f965 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ flowchart LR C --> D["reviewer
checks the diff"] D -->|pass| E["merge"] D -->|fail| C - C -.->|something went wrong| F["/lesson
fix the cause"] + C -.->|something went wrong| F["/lesson
propose a fix"] ``` 1. **Spec: agree on what to build.** @@ -52,7 +52,7 @@ flowchart LR If the plan turns out to be wrong, the agent stops and asks instead of improvising. 4. **Guardrails: run automatically while the agent works** (Claude Code, in projects set up with `kit sync`). The agent's file-edit tools cannot change tests, snapshots, or fixtures (unless you set `ALLOW_TEST_EDITS=1`), so it has to fix the code, not the test. - `scripts/verify.sh` runs after every edit and again before the agent may finish. + `scripts/verify.sh` runs after every file edit and again before the agent may finish. After the same check fails 3 times in a session, the hook tells the agent to stop and report instead of trying again. 5. **Review: a second agent checks the work.** The `reviewer` agent did not write the code and assumes it has bugs. @@ -73,9 +73,9 @@ It configures the AI coding agents you already use, and keeps them honest. - **Guardrails that run, not just prompts** (Claude Code): hooks block file-tool edits to tests, snapshots, and fixtures, run `scripts/verify.sh` after edits and before the agent stops, and tell the agent to stop after 3 failed checks. - **Stack-aware**: per-directory stacks (`nextjs`, `fastapi`) bring their own rules, lint presets, and checks, so a monorepo gets the right rules in each folder. - **Spec-driven workflow**: `/spec`, `/plan`, `/implement`, and `/lesson` commands plus a reviewer agent that checks each diff against its spec and plan. -- **Safe and reversible install**: symlinks (or generated files) into the clone, backups before anything is replaced, merged `settings.json`, idempotent reruns, and a clean `--uninstall`. +- **Safe and reversible install**: symlinks into the clone (Gemini commands are generated files), backups before anything is replaced, merged `settings.json`, idempotent reruns, and a clean `--uninstall`. - **Committed output**: `kit sync` writes plain files into the project, so CI needs nothing installed. -- **No runtime**: the kit itself needs only bash, git, and jq; no Node, Python, or package manager. +- **Minimal dependencies**: the kit itself needs only bash, git, and jq; no Node, Python, or package manager. ## Install @@ -113,7 +113,7 @@ Create `.agent-kit.json` at the project root, mapping each directory to its stac Then run `kit sync` in the project. It copies the stacks into `.agent-kit/stacks/`, writes each stack's rules into that directory's `AGENTS.md` between `agent-kit` markers (your own content outside the markers is kept), writes `docs/inventory/.md`, generates `scripts/verify.sh`, installs a pre-commit hook that runs `scripts/verify.sh fast`, and records the kit version. -Commit the result: CI needs nothing else installed, and teammates run `kit sync` to get the pre-commit hook (and `install.sh` for the agent guardrails). +Commit the result: CI needs nothing else installed, and teammates run `install.sh` (agent guardrails and the `kit` command), then `kit sync` (pre-commit hook). It prints the one line to add to your ESLint or Ruff config to extend the stack's preset. The file `.agent-kit.json` also turns on the global hooks for that project: