git why save or the gitwhy_save MCP tool.
Full template
Section reference
Metadata fields
The metadata block immediately after the title is required:- Context ID — assigned by the CLI on save. The agent writes a placeholder (
ctx_prefix); the CLI replaces it with the real ID. - Date — ISO 8601 timestamp. The agent writes the current time; the CLI validates and normalizes it.
- Saved by — the developer’s GitHub username or name.
- Agent — the agent name and model, in the format
agent-name (model-version).
Validation
When you rungit why save, the CLI validates that these required sections are present:
## Prompt## What Was Done## Reasoning## Files
See also
- Examples — a complete, well-written context
- Tips for agents — how to get good context output from your agent