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
Section titled “The 5 most common events”sentence_first_seen / sentence_removed
Section titled “sentence_first_seen / sentence_removed”Content lifecycle. A sentence appeared or disappeared.
refract export "Pluto" --from 71593043 --to 71601937 --format ndjson > events.jsonlThat range is 43 revisions from the day Pluto was reclassified. The queries on this page read the file with DuckDB. Event fields are camelCase (eventType, fromRevisionId).
SELECT timestamp, section, afterFROM 'events.jsonl'WHERE eventType = 'sentence_first_seen'ORDER BY timestamp;citation_added / citation_removed / citation_replaced
Section titled “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, eventType, before, afterFROM 'events.jsonl'WHERE eventType LIKE 'citation_%'ORDER BY timestamp;revert_detected
Section titled “revert_detected”An edit was undone. Refract checks edit comments against revert patterns. Multiple reverts on the same section signal edit-warring.
SELECT timestamp, sectionFROM 'events.jsonl'WHERE eventType = 'revert_detected'ORDER BY timestamp;template_added / template_removed
Section titled “template_added / template_removed”Policy templates. NPOV, citation needed, dispute — these are editorial signals
that someone flagged the content as problematic.
SELECT timestamp, eventType, afterFROM 'events.jsonl'WHERE eventType LIKE 'template_%'ORDER BY timestamp;section_reorganized
Section titled “section_reorganized”Section structure changed — sections were added, removed, or reordered. Often accompanies major content rewrites.
SELECT timestamp, sectionFROM 'events.jsonl'WHERE eventType = 'section_reorganized'ORDER BY timestamp;Your first 3 queries
Section titled “Your first 3 queries”refract analyze "Pluto" --from 71593043 --to 71601937 --depth detailed --json > pluto.jsonlduckdb -c "SELECT eventType, count(*) as nFROM 'pluto.jsonl'GROUP BY eventTypeORDER BY n DESC;"
duckdb -c "SELECT section, count(*) as nFROM 'pluto.jsonl'WHERE eventType LIKE 'citation_%'GROUP BY sectionORDER BY n DESCLIMIT 5;"
duckdb -c "SELECT timestamp, afterFROM 'pluto.jsonl'WHERE eventType = 'sentence_first_seen'ORDER BY timestampLIMIT 10;"- Full event taxonomy — all 26 event types
- Analytics with DuckDB — pre-built SQL views
- Wikipedia history tutorial — first full walkthrough