# Agent → Log (`/agent/log`)

Status: CONFIRMED by the operator 2026-09-12, with one addition: the log reads
the settings version history, so a direct database edit shows here like any
other change. Not built yet; on the board.

## What it is for
The record of who changed what the AI is told, and the conversation with the
website team about it. The prompt has three writers (the operator, the website
team through their own API, and any AI session through the write endpoint), so
the history lives here and Behaviour stays about the words as they are now
(operator, 2026-08-25).

## What it must show
- **What changed**: one entry per prompt change, newest first: when, who (a
  named person, the website team, or an AI session), the subject (which
  heading, which situation, which channel), and the wording before and after.
  A save that changed no wording says so.
- **The website team**: the message thread with them, read and unread, with the
  messages they sent about lines in the prompt beside the change those lines
  became.

## What it must do
- Read the log and the thread; mark the team's messages read; send a message
  to the team.
- Nothing here edits the prompt. Behaviour does that; a record you can edit is
  not a record.

## Deliberately not here
- No edit, no restore-this-version button: restoring is a Behaviour save.
- No activity, no decisions: those are Activity.

## Known gaps against intent
- Direct database edits (a Claude session editing `settings.agentSituations`
  with a backup key, four times on 2026-09-11) do not appear here, because they
  bypass the write endpoint. Either every session writes through the endpoint,
  or the log reads the settings history table so nothing is invisible.

## Proof
`Log.test.tsx` passes; a heading saved on Behaviour appears here within a
reload with the right author and the before/after wording.
