Handle Different File Types
This guide shows recommended configurations for various file types.
Structured Data Files
YAML Files
YAML files work best with the append policy:
Result:
# your-file.yaml
name: Example
version: 1.0
edit_history:
- timestamp: "2025-12-01T08:03:42+00:00"
model: claude-opus-4-5-20251101
action: CREATED
JSON Files
JSON files can also use append with the JSON format:
Result:
{
"name": "Example",
"version": "1.0",
"edit_history": [
{
"timestamp": "2025-12-01T08:03:42+00:00",
"model": "claude-opus-4-5-20251101",
"action": "CREATED"
}
]
}
Code Files
For code files, you have two options: sidecar files or embedded comments.
Python
Creates main.history.yaml alongside main.py.
JavaScript / TypeScript
HTML / XML
Result:
<!-- edit_history
- timestamp: '2025-12-01T08:03:42+00:00'
model: claude-opus-4-5
action: CREATED
-->
Documentation Files
Markdown
Markdown files are often regenerated or are documentation that shouldn't include audit trails:
Or use sidecar if you want to track them:
Configuration Files
Skip Generated/Lock Files
Related Topics
- Setup & Configuration — How to initialize and configure
.ai-blame.yaml - Configuration Guide — Detailed configuration options
- Provenance Annotation — How different output policies work
- CLI Reference — Command syntax for all commands