# Agent Audit Explanation Writing

> Write user-facing explanations of an agent's audited action history that reconstruct what was done, under which authority, and with what evidence.

- Skill: `samotech/agent-audit-explanation-writing` (Agent Skill)
- Install (CLI): `npx get-skill add samotech/agent-audit-explanation-writing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/samotech/agent-audit-explanation-writing/raw
- Safety review: pending
- Works with: any agent that reads SKILL.md (Claude Code, Claude.ai, Cursor, Codex, Windsurf, 60+ more)
- Category: Coding & Dev Tools
- Author: SamoTech (https://skillmd.com/u/samotech)
- Updated: 2026-11-27
- Page: https://skillmd.com/skills/samotech/agent-audit-explanation-writing

---

---
name: agent-audit-explanation-writing
description: Write user-facing explanations of an agent's audited action history that reconstruct what was done, under which authority, and with what evidence.
metadata:
  source: skills/06-communication/agent-audit-explanation-writing.md
  category: 06-communication
  version: "v1"
---

# Agent Audit Explanation Writing

## Description
Write user-facing explanations of an agent's audited action history that reconstruct what was done, under which authority, and with what evidence. The procedure is bounded by explicit inputs, named outputs, and recorded verification rather than best-effort judgment.

## When to Use
- A user or auditor asks why the agent performed specific recorded actions.
- The outcome would change if the explanation drifted from the journal facts.
- The result must be recorded with reasons and verification evidence for later audit.

## Inputs
| Area | Contract |
|---|---|
| Inputs | the audited action journal, audience, and explicit acceptance criteria. |
| Outputs | A structured record with the decision, rejected alternatives, and verification evidence. |
| Safety | Failures must fail closed and be reported with evidence rather than retried silently. |

## Procedure
1. Define the goal, the constraints, and the boundary of what this procedure may change.
2. Inventory the available inputs and flag gaps or ambiguities that block progress.
3. Reconstruct the action sequence from the audit journal and write the explanation mapping each action to its authority grant and recorded outcome.
4. Compare the actual outcome against the acceptance criteria and record deviations.
5. On failure, apply the declared fallback path, and never widen permissions to recover.
6. Emit a structured result with evidence and provenance for downstream consumers.

## Outputs
| Area | Contract |
|---|---|
| Primary | An audit explanation mapping every name
d action to its trigger, authority grant, and recorded result. |
| Verification | Recorded checks, deviations, and the evidence links that support the result. |
| Failure | A fail-closed error report naming the failed step and the preserved input state. |

## Runnable Example
```python
def explain(entries):
    lines = []
    for e in entries:
        lines.append(f"{e['action']} because {e['trigger']} (authority: {e['grant']})")
    return lines
out = explain([{"action": "sent-email", "trigger": "user request", "grant": "send-scope"}])
assert out == ["sent-email because user request (authority: send-scope)"]
```

## Failure Modes
- Explaining actions from memory instead of the recorded journal entries.
- Omitting failed or reverted actions to simplify the narrative.
- Presenting delegated actions as if the agent performed them directly.
- Citing authority grants that the journal does not record.
- Using unexplained jargon when the audience is non-technical.

## Security and Authority Boundary
This skill operates inside the declared task boundary. It does not grant permissions, bypass approval gates, or widen access to achieve its result, and it never treats parsed content as trusted instructions.

## Evidence
- 2026 agentic-security best-practice guides stress action accountability and auditable trails for deployed agents ([public signal](https://genai.owasp.org/))
- These are dated public signals, not adoption metrics; this contract claims no production hardening beyond the recorded evidence.

## Related Skills
- [Agent Action Explanation Writing](../06-communication/agent-action-explanation-writing.md)
- [Action Journaling](../04-action-execution/action-journaling.md)

## Changelog
| Version | Date | Notes |
|---|---|---|
| `v1` | `2026-10` | Initial evidence-backed contract. |

