Documentation
¶
Overview ¶
Package kirobuff is a buff for Kiro CLI: enforced change-safety guardrails, composable agent modes, reasoning-effort tuning, and context-cost budgeting.
The command lives at github.com/AlleyBo55/KiroBuff/cmd/kirobuff. Install it and run once:
go install github.com/AlleyBo55/KiroBuff/cmd/kirobuff@latest kirobuff install
What it does ¶
Most of what people want from an agent harness is not more capability but fewer ways to be surprised. kirobuff configures Kiro CLI so that an AI coding agent classifies every change before touching a file: additive and behaviour-preserving work proceeds without asking, while behaviour-changing and subtractive work stops and asks.
Five rules go further and are enforced mechanically rather than requested. A preToolUse hook exits 2, which blocks the tool call outright and tells the model why:
- an agent adding a Signed-off-by trailer, which only a human may certify
- deleting a test file
- an edit that reduces a test's assertion count
- writing to a loop's own verifier or score record
- git reset --hard, push --force, clean -fd, branch -D
Reusable packages ¶
Three packages are exported for use outside the command:
- github.com/AlleyBo55/KiroBuff/enforce evaluates agent tool calls against pluggable change-safety rules. Implement enforce.Rule to add your own.
- github.com/AlleyBo55/KiroBuff/attest generates and validates Assisted-by commit trailers per the Linux kernel's AI-assisted contribution policy, including the rule that agents may not sign off on the Developer Certificate of Origin.
- github.com/AlleyBo55/KiroBuff/semver classifies Conventional Commits into major, minor and patch bumps.
Everything else is under internal/ because it is specific to laying out Kiro CLI configuration on disk.
Keywords ¶
AI coding agent guardrails, agentic coding safety, LLM agent permissions, Kiro CLI configuration, Claude Code alternative tooling, agent hooks, preToolUse hook, prompt injection of change policy, token budget estimation, context window cost, reasoning effort tuning, Conventional Commits semver, Assisted-by trailer, Developer Certificate of Origin, Linux kernel AI policy, AI attribution, regression prevention, test deletion prevention, agent mode composition, Karpathy loop, verifier-driven agent loop.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package attest generates and validates AI-attribution trailers for commit messages.
|
Package attest generates and validates AI-attribution trailers for commit messages. |
|
cmd
|
|
|
kirobuff
command
Command kirobuff applies guardrails, tuning, and instrumentation to Kiro CLI.
|
Command kirobuff applies guardrails, tuning, and instrumentation to Kiro CLI. |
|
Package enforce blocks agent tool calls that violate change-safety rules, rather than asking the model not to make them.
|
Package enforce blocks agent tool calls that violate change-safety rules, rather than asking the model not to make them. |
|
internal
|
|
|
budget
Package budget estimates the recurring token cost of a Kiro CLI agent configuration and reports where that cost can be cut without losing capability.
|
Package budget estimates the recurring token cost of a Kiro CLI agent configuration and reports where that cost can be cut without losing capability. |
|
discover
Package discover locates agent-configuration artifacts belonging to Claude Code and Kiro CLI, in both the user (home) and workspace scopes.
|
Package discover locates agent-configuration artifacts belonging to Claude Code and Kiro CLI, in both the user (home) and workspace scopes. |
|
eval
Package eval scores the guardrails against a labelled corpus.
|
Package eval scores the guardrails against a labelled corpus. |
|
guard
Package guard installs the budget check as an agentSpawn hook so it runs automatically at the start of every session.
|
Package guard installs the budget check as an agentSpawn hook so it runs automatically at the start of every session. |
|
loop
Package loop scaffolds a Karpathy-style agent loop: a verifier the agent cannot grade itself against, a state ledger so the next iteration resumes instead of restarts, and a stop condition.
|
Package loop scaffolds a Karpathy-style agent loop: a verifier the agent cannot grade itself against, a state ledger so the next iteration resumes instead of restarts, and a stop condition. |
|
mode
Package mode implements composable, toggleable modes.
|
Package mode implements composable, toggleable modes. |
|
persona
Package persona generates opt-in agent personas: modes you switch into deliberately rather than run all the time.
|
Package persona generates opt-in agent personas: modes you switch into deliberately rather than run all the time. |
|
power
Package power produces platform-correct instructions for keeping a machine awake with the lid closed, so an agent can keep working unattended.
|
Package power produces platform-correct instructions for keeping a machine awake with the lid closed, so an agent can keep working unattended. |
|
preflight
Package preflight checks a branch against its base before a push, so conflicts surface while they are still cheap to fix.
|
Package preflight checks a branch against its base before a push, so conflicts surface while they are still cheap to fix. |
|
release
Package release checks for a newer published release and replaces the running binary with it.
|
Package release checks for a newer published release and replaces the running binary with it. |
|
sentinel
Package sentinel detects test coverage disappearing, whatever route it took.
|
Package sentinel detects test coverage disappearing, whatever route it took. |
|
statusline
Package statusline renders a session indicator into the terminal's window title.
|
Package statusline renders a session indicator into the terminal's window title. |
|
steering
Package steering installs guardrails that apply to every agent without being switched on.
|
Package steering installs guardrails that apply to every agent without being switched on. |
|
tune
Package tune writes per-model reasoning-effort defaults into Kiro CLI's settings file, so a model stops spending more thought than a task deserves.
|
Package tune writes per-model reasoning-effort defaults into Kiro CLI's settings file, so a model stops spending more thought than a task deserves. |
|
Package semver reports the build's identity and classifies Conventional Commits into semantic-version increments.
|
Package semver reports the build's identity and classifies Conventional Commits into semantic-version increments. |
