| name | audit-document |
| description | Display the audit trail of all document analysis actions. Use when the user asks to see the "audit trail", "history", or "what we've done". |
Audit Document
Display the audit trail of all document analysis actions.
Instructions
-
Query the audit log from SQLite:
sqlite3 -header -column "${CLAUDE_PLUGIN_DATA}/documents.db" \
"SELECT id, timestamp, action, actor, detail FROM audit_log ORDER BY id"
-
Present the results as a chronological log:
- load actions: what archive/files were loaded, how many documents, how many clauses
- search actions: what was searched, how many results, across which documents
- eval actions: what criteria were used, findings summary
-
If the user asks for a provenance summary, cross-reference:
- Which findings are supported by which search results
- Which searches returned the evidence used in findings
- Flag any findings that lack direct search evidence
Prerequisites
- Documents must be loaded (the audit_log table is created during load)
Constraints
- The audit log is append-only — never delete or modify entries
- Timestamps are UTC
- Present in reverse chronological order if the user asks for "recent" activity