Reads {output_dir}/ai_decisions.jsonl and produces a summary of all
recorded decisions. Useful for post-analysis review and reporting.
Arguments
- output_dir
Character. The same output directory passed to
init_audit_log.
Value
A named list with:
- total_decisions
Integer. The total number of logged decisions.
- decisions_by_type
Named integer vector of counts per
decision_type.- decisions_by_step
Named integer vector of counts per pipeline
step.- new_codes_timeline
A
data.framewith columnstimestampandcumulative_codes, showing the running total of new codes over time.- entries_skipped
Integer. The number of
entry_skippeddecisions.- merge_decisions_accepted
Integer. Merge decisions where
action == "merge".- merge_decisions_standalone
Integer. Merge decisions where
action == "standalone".- total_ai_requests
Integer count of
ai_requestrecords, one perai_completecall.- total_tokens_used
Integer. The sum of
usage_totalacross allai_requestrecords, with NA values dropped.- ai_requests_by_model
Named integer vector of
ai_requestcounts per model name.- methodology_modes_observed
Character vector of the unique non-NA values of the
methodology_modefield across all records. This is normally length-1 or length-0; a length above 1 marks a run whose methodology was changed mid-pipeline.
Details
Some fields (total_ai_requests, total_tokens_used,
ai_requests_by_model, methodology_modes_observed) are absent
from very old audit logs. For those logs the summary returns zero or empty
values for the missing keys, while the remaining counts still surface in
decisions_by_type and decisions_by_step as usual.