KIAI · open source · v0.2

A black box for AI coding agents

Claude Code, Cursor and Codex now write a large share of our code. When a tech lead or a client asks "what exactly did the agent do, and can I trust it?", the honest answer is usually a chat transcript nobody will read. KIAI records the flight, lets anyone verify it, and turns it into an acceptance packet a human signs.

Code on GitHub Install in a few minutes

Install (Claude Code)

claude plugin marketplace add yuta9999zn/kiai-plugin
claude plugin install kiai@kiai

Hooks are active in every session from then on. A .kiai/ folder appears in a repository the first time a hook fires there. KIAI itself makes no network calls: no account, no server, the flight record stays in your repository. (Your coding agent still talks to its model provider as before.)

What you get

What a packet says

Verbatim lines from a real bilingual packet (--lang both) produced on 2026-09-05 against a live Claude Code 2.1.261 session. Sections between the lines are omitted; nothing is edited. The writer id is the recording machine's hostname slug.

# Hồ sơ nghiệm thu / Acceptance packet — UOW-120

- **Trạng thái / Status:** **CHẤP NHẬN / APPROVED** — Người quyết định / Decided by: **tech lead (probe)** · Lúc / At: 2026-09-05T23:24:26.266Z · Ghi qua / Recorded via: người, ngoài phiên agent / human, outside any agent session
- **Chuỗi flight record / Flight record chain:** ✅ nguyên vẹn / intact — 7 bản ghi / records; đầu chuỗi / heads: `hideki-f5284e` 7 → `39a3fa40fd5cffcd…`

## Tiêu chí nghiệm thu / Acceptance criteria

> - [ ] hello.txt exists and contains the word kiai

| `hello.txt` | write | `920bc4834ade2e83…` | ✅ khớp / matches |

Hash: bcb15d087aefeb7ce12ae62ddbd2f845420b5ec845fbcba2f5895fc9c985e0d2

The full file is committed in the KIAI repository as probe-UOW-120b-acceptance-approve.md. kiai accept --check recomputes that footer and, inside the repository, prints the decision record that sealed the file, or NOT SEALED.

What it does not do yet

How it was built

Both releases so far went through an independent adversarial review before they shipped, and the reports are in the repository. The review of v0.1 found a truncated chain tail that verify did not catch, secrets slipping past redaction and two clones breaking one chain through git. The review of v0.2 found absolute paths that made packets useless on a clone, a lock race that could leave an approved packet without its record, and an agent able to "approve" its own work. All of it is fixed, with tests (42, offline, Node 18+), and documented in the repository.