Skip to main content
history.json is the local audit log for a Buttons workspace. It records workspace mutations:
  • registry dependency changes from buttons add
  • manifest installs from buttons install
It is a single top-level file and is gitignored — auditability is per-machine.

Event shape

The file has a schema version and an ordered events array:

Actions

History records:

What’s tracked

Lifecycle events are local audit records. They are not the source of truth for dependency resolution; the source of truth is:
Ignored (runtime and secret-bearing):

Commit policy

Commit:
  • your authored button and drawer specs — button.json, drawer.json, the code file, and AGENTS.md
  • .buttons/buttons.json and .buttons/buttons-lock.json when your project depends on registry buttons
Do not commit:
  • .buttons/history.json
  • pressed run history (buttons/*/pressed/, drawers/*/pressed/)
  • batteries.json, webhook.json, idempotency/, queues/
Registry dependencies are pinned in .buttons/buttons-lock.json, not inside each installed button.json. Committing the manifest and lockfile lets a teammate materialize the same versions with buttons install. history.json stays local — it is each machine’s own audit trail.

Press failures & replay

history.json above tracks dependency lifecycle events. A target’s run history is separate: one JSON file per press under buttons/<name>/pressed/ (and drawers/<name>/pressed/), each recording the args, exit code, output, and status. There is no dead-letter queue — a failed press is just a run record with a non-ok status. That makes triage a short loop an agent runs entirely from the CLI:
  1. Spot failuresbuttons summary --json aggregates recent failures across the workspace under recent_failures.
  2. Drill inbuttons history <name> (or buttons drawer <name> --json) shows that target’s recent runs, including the exact args each was pressed with.
  3. Replay — once the cause is fixed, re-press with those same args:
Because the args live in the run record, replay is just reading them back and pressing again — no queue to drain, no separate replay command. See buttons summary and buttons history.