Source index · Technical reference · Home

UNRELEASED DEVELOPMENT SNAPSHOT · READ-ONLY EXCERPT

bin/li-review-log

This is the cited technical source at local revision 275a354, inspected on 22 September 2026. It differs from the public release. This reference publishes only the cited sections, not an installable release or the development branch.

Line numbers refer to the complete recorded file. Uncited lines are omitted. Full-file SHA-256: 2b0eb49cd97ad9af51ab25c1649974b0311efd23b0c605d37ddda225c8f62152.

1#!/usr/bin/env bash
2# bin/li-review-log — native review-log writer
3#
4# Lintel's review skills (plan-ceo-review, plan-eng-review, plan-design-review,
5# plan-devex-review, code-review, codex) call this on the execution path. It takes
6# a single JSON-object argument and appends one record via audit_log() to Lintel's
7# own audit log at .claude/runtime/audit/reviews.jsonl (scope-routed by bin/_audit.sh).
8#
9# Record fields: skill, status, commit, timestamp — plus any extra keys, preserved
10# verbatim under "raw". First-party by design: the review log stays on Lintel's own
11# execution path with no external binary dependency.
13# Usage:
14# bin/li-review-log '{"skill":"plan-eng-review","timestamp":"...","status":"CLEAR","commit":"7e7a021","mode":"FULL_REVIEW"}'
16# Contract:
17# - Single argument: a JSON object describing the review.
18# - Recognised top-level keys: skill, status, commit, timestamp (+ any extras,
19# which are preserved verbatim in the "raw" field).
20# - Invalid JSON (best-effort check) is rejected with exit 1.
22# Writes to: .claude/runtime/audit/reviews.jsonl (category=reviews, kind=<skill>; scope-routed by _audit.sh)
24# Exit codes:
25# 0 = record written
26# 1 = invalid / missing JSON input
27# 2 = invocation error (audit helper missing, etc.)
29set -euo pipefail
31REPO_ROOT="${LINTEL_REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." 2>/dev/null && pwd)}"
33usage() {
34 head -33 "$0" | sed 's/^# \{0,1\}//' | sed '1d'
35 exit "${1:-2}"