Kibi Commit Review
ASecurityUse when kibi check --staged or the Kibi pre-commit hook blocks a commit (kibi_impact_evidence_missing, symbols_manifest_stale, symbol_granularity_violation, symbol-coverage, kibi check-generated drift, Staged impact review failed), or when preparing a commit or pull-request impact review. Covers reading the per-file Detail lines, authoring .kb/symbols.yaml symbol entries through kb_upsert, staging the tracked Kibi evidence with git add (symbol coordinates are derived and never staged), kb_pr...
- 13 stars
- 0 votes
- 0 copies
- 2 views
- Added November 13, 2026
Works with
Security analysis
100/100Pro scans all 2 files and shows the line behind each finding
npx -y skills add Looted/kibi --skill kibi-commit-review --agent claude-codeAre you the author of Kibi Commit Review?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/looted-kibi-commit-review-cb78b5fa)---
name: kibi-commit-review
description: "Use when kibi check --staged or the Kibi pre-commit hook blocks a commit (kibi_impact_evidence_missing, symbols_manifest_stale, symbol_granularity_violation, symbol-coverage, kibi check-generated drift, Staged impact review failed), or when preparing a commit or pull-request impact review. Covers reading the per-file Detail lines, authoring .kb/symbols.yaml symbol entries through kb_upsert, staging the tracked Kibi evidence with git add (symbol coordinates are derived and never staged), kb_prepare_impact_review for a staged or diff scope and kb_author_impact_review to write the record, the kibi signoff requirements summary to show before a commit, how merge commits and migration renames are judged, and which requirement a newly listed symbol belongs to without making that requirement too broad."
license: AGPL-3.0-or-later
metadata:
id: kibi-commit-review
version: 1.11.0
kibiCompatibility: ">=1.0.0"
tags:
- kibi
- commit
- staged-check
- traceability
- agent-guidance
resources:
- resources/staged-gate.md
- resources/impact-review.schema.json
---
## Goal
Get a commit through Kibi's staged gate by fixing the cause: the commit
carries the knowledge its behavior change needs, with current symbol
coordinates, so the gate passes for the same reason a reviewer would accept it.
## Interface Selection
Use the visible approved MCP tools or the trusted project-local CLI as equal
peer interfaces (CLI JSON: `printf '%s\n' '{}' | npx --no-install kibi status
--input -`). The gate itself is CLI: `npx --no-install kibi check --staged`
(add `--format json` for the full evidence). If neither surface is available,
stop and name the missing capability. Never edit `.kb/` files by hand.
## When this applies
- `kibi check --staged` fails, or the pre-commit hook (`kibi check-generated
--staged --changed-only`, then `kibi check --staged`) blocks a commit.
- You are about to commit or open a pull request and want the impact review
ready first.
Do not edit `.kb` files by hand; staging `.kb` with `git add` is expected.
Read what the gate needs through Kibi instead of opening `.kb` files: the
gate's `Detail:` lines, `kb_query` by `sourceFile` or `id`, and `kb_check`
with `staged: true` show which symbols and coordinates are covered and which
are missing. Before deciding what the change is, run `kb_search` with
`sourceLocations` for each named file and `kb_query` the requirement that
governs it, even when the edit looks coordinate-only. When a write is
authorized, keep the supplied target and its intended edges and send it with
`kb_upsert`: the result reports what was written and its typed `nextActions`,
so no read-back is needed. `dryRun: true` is an optional preview and records
nothing. Never resend a write that already committed.
## Steps
1. **Read the whole failure.** Each finding names an id, the files, `Detail:`
lines and a `Suggestion:`. Detail lines are complete per file: how many
of its declarations the commit adds or changes, and every one of those
missing from `.kb/symbols.yaml` with its line. Declarations the commit did
not touch are not judged. The common ids and their fixes are in `resources/staged-gate.md`.
2. **Find the owning knowledge.** `kb_search` with `sourceLocations` for each
named file (or `kb_query({sourceFile})`), then `kb_query` the requirements,
scenarios and tests it returns. Run `kb_check` with `sourceFiles`,
`includeImpactDiagnostics: true` and `staged: true` to see the impact
findings, including `requirement_statement_unverified` quotes.
3. **Decide what the change is.**
- Behavior changed: update or record the knowledge (a requirement with a
scenario, or a new clause) through `kb_upsert`. If the change contradicts
a recorded rule, stop and ask; load `kibi-decisions`.
- New or uncovered symbols: author a `symbol` entity per listed symbol
through `kb_upsert` (`title` = the member the extractor names,
`sourceFile`, `status: active`, `symbol_role: behavioral`, `implements`
to the requirement, `covered_by` to the test). Link each symbol to the
requirement whose behavior it decides, not to whichever requirement the
file's other symbols use or has room; see Choosing the owner in
`resources/staged-gate.md`.
- Only lines moved: nothing to do. Symbol coordinates are derived locally
by every sync and never committed.
- No behavior change (a genuine false positive): see the audited
no-impact note in `resources/staged-gate.md`; it never covers a real
behavior change.
4. **Stage the evidence.** Kibi authors tracked files but never Git-stages or
commits them. `git status --short .kb` lists what it wrote; `git add` the
entity Markdown, `.kb/relationships/` shards and `.kb/symbols.yaml` that
belong to this change (use `git add -p` when the files hold unrelated
edits). `.kb/symbol-coordinates.yaml` is gitignored; never stage it.
5. **Re-run** `kibi check --staged` (and `kibi check-generated --staged` when it
failed) until it passes. Never bypass the hook (`--no-verify`) unless the
person says so.
6. **Run the unfiltered `kb_check` once** after authoring symbol entries and
read its `qualityDiagnostics`. The staged gate does not judge requirement
size, so a link that makes a requirement too broad
(`broad_requirement_review`) shows only there, and can fail a project's
CI gate after the commit passed. A result over its size budget comes back
`truncated` with advisory findings as counts by id; `kibi check --format
json` lists every one.
Keep the source change as small as the task. Reshaping a function the task
did not need (extracting a helper, renaming an export) adds declarations the
gate then asks you to own, and each new link counts toward its requirement's
size.
## Requirements signoff
Before you ask the person to approve a commit that adds, rewrites or retires
requirements, or changes code that implements them, show them what they are
signing off:
```
npx --no-install kibi signoff # working tree; --staged for the index
```
It prints Markdown listing each new, changed, affected and retired
requirement with its statement (before and after for a rewrite), firmness,
origin, scenarios and proof state. Put it in your reply unchanged (in the
messaging tool's message when replies go through one), then add one or two
sentences on why the requirements changed. Offer the full page with
`kibi signoff --format html --open`, or publish `.kb/briefs/signoff/latest.html`
as a rendered page when your host has a page tool (the Artifact tool in Claude
apps); never attach the `.html` as a file, which chat apps show as raw source;
past 15 requirements the Markdown stops and only the page lists them all.
Host details: `kibi-decisions`, `resources/signoff-views.md`. `--no-proof` skips the proof lookup, which reads coverage and is slow
on a large knowledge base. The summary is not an approval: never set
`approved_by` or `origin.ref` from it. Show it before you open or merge the
pull request. When the person answers, record their answer in the same
change (their name in `approved_by`, their words in `origin.ref` or
`approval_ref`) and push it to the same pull request; never move a signoff,
firmness or waiver approval into a separate pull request.
## Impact reviews
When the repository's base commit carries `.kibi/impact-policy.json`, the gate
also demands a content-bound review record at `.kibi/impact-review.json`
(`Staged impact review failed: impact_review_invalid ...`). Prepare it with
`kb_prepare_impact_review` (core MCP profile: CLI `kibi prepare-impact-review --input -`) (`scope: {"kind":"staged"}`, or `{"kind":"diff",
"baseCommit":"<40-hex sha>","headCommit":"<40-hex sha>"}` for a pull
request). It is read-only: it returns a row per changed file with its
requirement ids and pending obligations, each requirement once with its
fingerprints, and full evidence only for the `paths` you name. Decide each
file from what you verified, then write the record with
`kb_author_impact_review` (CLI `kibi author-impact-review --input -`, staged
scope), passing `recordHeaders.scope.fingerprint`; Kibi adds the evidence,
validates the record and keeps earlier decisions for unchanged files. Stage it
with `git add -f .kibi/impact-review.json`. Put the person's id in
`reviewer.id` only when they reviewed it, and never present the record as
their approval. When the person will review and sign, do not write the record:
save your decisions as the author input, with `"reviewer": {"id": ""}`, to
`.kibi/impact-review-decisions.json` and give them
`npx --no-install kibi author-impact-review --input .kibi/impact-review-decisions.json`
to run after they add their id; the gate stays shut until they do. Field details are in `resources/staged-gate.md`; the record
schema is `resources/impact-review.schema.json`.
## Merge commits and migrations
During a merge (`MERGE_HEAD` exists), files staged unchanged from a merged
parent are skipped (`Merge commit: N staged file(s) are taken unchanged ...`);
only what the merge resolved or edited is judged. A commit that moves
knowledge into `.kb/` after `kibi migrate` is compared with the old paths
(`Baseline: HEAD with N staged knowledge rename(s) ...`), and symbol records
changed only by the migration are not judged as changed. Debt reported there
came from the branch or the old layout; the full `kibi check` still shows it.
## Typed results and report
Parse `kibiProtocol`, `status`, diagnostics and typed `nextActions` on every
Kibi write. On `committed_with_repairs`, run the repair actions and never
resend the original write. Report the findings you fixed (id, file, what
changed), the knowledge you recorded or confirmed still current, the files
you staged, the final `kibi check --staged` result, and anything left for the
person (an open rule conflict, an unauthored review decision).
Files in this skill
- SKILL.md
- resources/staged-gate.md
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.