← back to projects
research tool
2025

AI Contribution
Tracker

A real-time, multi-user collaborative editor that logs every AI-generated edit as a structured, inspectable record. Co-authors always know who wrote what, and when AI was involved.

editor room / contribution list
Contribution list with tags
01 · overview

Making AI's role in a shared document impossible to miss.

Human-AI collaborative writing tools are getting good at generating text. They are much worse at showing who is responsible for it. When several people and an LLM edit the same document in real time, it becomes hard to tell what a person wrote and what the AI suggested. It gets harder still when AI shapes someone's writing without ever being asked directly.

This project extends an earlier real-time collaborative editor I built with Yjs, PartyKit, and Quill, which already supported multi-user AI prompting. It adds a system that treats every AI contribution as a first-class, traceable record. The record appears the moment it happens. It is never reconstructed after the fact.

the problem

Co-authors have no reliable way to see what an AI changed, when, or why. This gets worse once AI-generated text blends into normal editing.

the approach

Every AI action is logged the moment it happens. Each record captures the prompt, the response, a timestamp, and a snapshot of the document, and it syncs live over PartyKit.

the outcome

A working, open-source system that puts two published human-AI transparency frameworks, FAICO and HaLLMark, to work inside a real-time, multi-user editor.

02 · how it's built
deep dive 01

Differentiating human vs. AI edits

Some tools, like Upwelling, tag every keystroke with an author ID. This system takes a different approach. AI actions are recorded event by event instead. The moment a user triggers an AI feature, the editor captures the selected text and takes a snapshot of the document. It sends the prompt, and once the suggestion is accepted, it records the whole exchange as a single AIContributionDetail. Human edits stay untagged, ordinary operations. AI-generated changes are always distinguishable, and the approach never requires a forked CRDT implementation.

event-based logging Yjs snapshots
The AI prompt panel inside the editor
Right-click tooltip showing an AI contribution's detail
deep dive 02

Handling concurrent AI + human edits

Yjs's CRDT algorithm already merges concurrent character-level operations safely. That alone does not stop an AI rewrite and a live human edit from targeting the same sentence at once. The editor converts the AI's target span into Yjs RelativePositions and temporarily locks that range. Any conflicting selection or edit is cancelled until the AI suggestion resolves. The range then unlocks. The editor finds the exact span, even if nearby content has shifted, and replaces it.

Yjs RelativePositions range locking
architecture at a glance
editor
Quill
y-quill binding
quill-cursors
sync
Yjs (CRDT)
Y-PartyKit provider
WebSocket
storage
PartyKit key-value store
In-memory contribution array
data model
AIContributionDetail
AIContributionMetadata (Y.Map)

AI Contribution List

A persistent side panel logs every AI interaction in real time. It can be filtered by user, feature, or tag, and searched or sorted by timestamp.

Snapshot Viewer

Opens the exact document state at the moment of an AI contribution, in a read-only side drawer for review.

Show in Editor

One click highlights the corresponding text span live in the main editor. The log entry links straight back to the actual content.

Tagging

Tags are free-form and added after the fact. They might capture semantic impact, structural placement, or influence level, and there is no fixed taxonomy to follow.

AI-Inspired Declaration

Lets a user voluntarily mark their own writing as influenced by an earlier AI interaction, even when no text was directly inserted.

Dashboard & Timeline

Team-level stats cover contributors, features used, and the most-triggered actions. A zoomable, color-coded timeline tracks AI activity across the whole session.

04 · framework alignment

The system does not invent its own definition of "transparency." It was built against two published human-AI collaboration frameworks instead. That is the same kind of alignment a production or enterprise setting would check for, not just a research demo.

FAICO-aligned

The editor implements the framework's contribution identity, visibility, and context principles directly. Every AI action is labeled with its user, timestamp, and source. It appears immediately in the persistent Contribution List. The full prompt and response are stored for later review.

Rezwana & Ford, "FAICO: Framework for AI Communication in Human-AI Co-Creativity" (2025)
HaLLMark-aligned

The system covers all three HaLLMark principles. Traceability comes from granular per-span attribution and highlighting. Transparency comes from the Snapshot Drawer and the full prompt-and-response history. Agency comes from the voluntary "Mark as AI-Inspired" declaration.

Hoque et al., "The HaLLMark Effect" (2024)
05 · reflection

What I'd keep

+Traceability is built into the core interface, not bolted on afterward. It reduced redundant edits instead of adding friction.
+Event-based logging beats per-character CRDT tagging here. It is far simpler to implement, it needs no forked framework, and it still gives full attribution.

What's next

→Real-time, granular undo and redo for AI insertions, building on the version snapshots already in place.
→Partitioned metadata storage, so contribution tracking can scale to larger, longer-running teams.
→Inferred AI-influence detection, to complement the self-reported "AI-Inspired" declaration with something closer to automatic.
→Deeper integration with platforms people already write in, like Google Docs or Overleaf, so the same tracking works wherever the writing happens.
next
TestLab Request Manager
An internal Power Apps tool that turned ad-hoc email requests into one tracked, automated workflow.
view tool →