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 bash2
# bin/li-review-log — native review-log writer3
#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 takes6
# a single JSON-object argument and appends one record via audit_log() to Lintel's7
# 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, preserved10
# verbatim under "raw". First-party by design: the review log stays on Lintel's own11
# execution path with no external binary dependency.12
#13
# Usage:14
# bin/li-review-log '{"skill":"plan-eng-review","timestamp":"...","status":"CLEAR","commit":"7e7a021","mode":"FULL_REVIEW"}'15
#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.21
#22
# Writes to: .claude/runtime/audit/reviews.jsonl (category=reviews, kind=<skill>; scope-routed by _audit.sh)23
#24
# Exit codes:25
# 0 = record written26
# 1 = invalid / missing JSON input27
# 2 = invocation error (audit helper missing, etc.)29
set -euo pipefail31
REPO_ROOT="${LINTEL_REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." 2>/dev/null && pwd)}"33
usage() {34
head -33 "$0" | sed 's/^# \{0,1\}//' | sed '1d'35
exit "${1:-2}"36
}