Quickstart: common events

New to Refract? These are the 5 event types you'll see most often, what they mean, and how to query them. After 5 minutes, move on to the full event taxonomy.

The 5 most common events

sentence_first_seen / sentence_removed

Content lifecycle. A sentence appeared or disappeared.

refract analyze "Earth" --depth brief
SELECT timestamp, section, after
FROM 'events.jsonl'
WHERE event_type = 'sentence_first_seen'
ORDER BY timestamp;

citation_added / citation_removed / citation_replaced

Source changes. Added, removed, or swapped. citation_replaced means the claim text stayed but the supporting source changed — the strongest revisionism signal.

SELECT timestamp, event_type, before, after
FROM 'events.jsonl'
WHERE event_type LIKE 'citation_%'
ORDER BY timestamp;

revert_detected

An edit was undone. Refract checks edit comments against revert patterns. Multiple reverts on the same section signal edit-warring.

SELECT timestamp, section
FROM 'events.jsonl'
WHERE event_type = 'revert_detected'
ORDER BY timestamp;

template_added / template_removed

Policy templates. NPOV, citation needed, dispute — these are editorial signals that someone flagged the content as problematic.

SELECT timestamp, event_type, after
FROM 'events.jsonl'
WHERE event_type LIKE 'template_%'
ORDER BY timestamp;

section_reorganized

Section structure changed — sections were added, removed, or reordered. Often accompanies major content rewrites.

SELECT timestamp, section
FROM 'events.jsonl'
WHERE event_type = 'section_reorganized'
ORDER BY timestamp;

Your first 3 queries

refract analyze "Bitcoin" --depth detailed -c > bitcoin.jsonl
duckdb -c "
SELECT event_type, count(*) as n
FROM 'bitcoin.jsonl'
GROUP BY event_type
ORDER BY n DESC;
"

duckdb -c "
SELECT section, count(*) as n
FROM 'bitcoin.jsonl'
WHERE event_type LIKE 'citation_%'
GROUP BY section
ORDER BY n DESC
LIMIT 5;
"

duckdb -c "
SELECT timestamp, after
FROM 'bitcoin.jsonl'
WHERE event_type = 'sentence_first_seen'
ORDER BY timestamp
LIMIT 10;
"

Next

Type something to search...