General editorial guide prepared with AI assistance. Examples are hypothetical; implementation depends on project requirements and qualified review.
Decision and problem
An audit trail differs from technical error logs: it explains what changed, who changed it and under which authority. Error logs support diagnosis. Avoid recording passwords, access tokens or full clinical content without necessity and controls.
Designing the solution
Use stable event IDs, consistent timestamps and record/action references. Restrict audit reads and modifications and define retention. For sensitive financial events, preserve corrections as linked transactions instead of overwriting history.
Practical acceptance test
Perform an authorized edit, a rejected attempt and a correction on test data. Verify the trail explains context without secrets and ordinary users cannot delete their history or view out-of-scope events.
