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.
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.
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.
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.
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.
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.
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.
y-quill binding
quill-cursors
Y-PartyKit provider
WebSocket
In-memory contribution array
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.
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.
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.
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.