Home / Commands / gastownhall/beads

audit

Log and label agent interactions (append-only JSONL)

commandLicense: MIT Source: gastownhall/beads

Install

Copy this folder into your Claude Code project (needs Node.js):

curl -fsSL --create-dirs -o .claude/commands/audit.md https://raw.githubusercontent.com/gastownhall/beads/HEAD/plugins/beads/skills/beads/commands/audit.md

Or install it for every project:

curl -fsSL --create-dirs -o ~/.claude/commands/audit.md https://raw.githubusercontent.com/gastownhall/beads/HEAD/plugins/beads/skills/beads/commands/audit.md

File content

Made by its original authors and shared under MIT. We show it unchanged, with credit and a link to the source. Source ↗

---
description: Log and label agent interactions (append-only JSONL)
argument-hint: "record|label"
---

Append-only audit logging for agent interactions (prompts, responses, tool calls) in `.beads/interactions.jsonl`.

Each line is one event. Labeling is done by appending a new `"label"` event referencing a previous entry.

## Usage

- **Record an interaction**:
  - `bd audit record --kind llm_call --model "claude-3-5-haiku" --prompt "..." --response "..."`
  - `bd audit record --kind tool_call --tool-name "go test" --exit-code 1 --error "..." --issue-id bd-42`

- **Pipe JSON via stdin**:
  - `cat event.json | bd audit record`

- **Label an entry**:
  - `bd audit label int-a1b2 --label good --reason "Worked perfectly"`
  - `bd audit label int-a1b2 --label bad --reason "Hallucinated a file path"`

## Notes

- Audit entries are **append-only** (no in-place edits).
- `bd dolt push` includes `.beads/interactions.jsonl` in the commit allowlist.