Analysis v0.10.7 on main

Why does this line exist?

lineage

Per-change provenance — answers "why does this line exist?". Records session/turn metadata plus a secret-redacted, size-capped snippet for every Edit/Write/MultiEdit, and for each file a Bash command changes, at PostToolUse into a per-project change ledger, then traces a file or line back to the change that introduced it by joining records to the transcripts historian preserves. Emits lineage.* events for audit. Builds on the Onlooker ecosystem plugin.

Install /plugin install lineage@onlooker-community

Problem

A reviewer opens a file and asks why a conditional is there. Git records what changed and Scribe records a session's intent, but nothing connects a specific piece of code to the prompt, agent and session that produced it. The why behind a line is gone once the session closes.

How it works

  1. On PostToolUse for Edit, Write, MultiEdit and Bash, Lineage derives the project key from cwd and reads the current turn from the session tracker. For Bash it asks git which files changed, so a heredoc or sed -i still lands in the ledger.
  2. It extracts each change's added content, redacts secret-shaped substrings, caps the size, and appends a record to a per-project change ledger. The event on the bus carries metadata and a digest, never the content.
  3. /lineage <file>:<line> finds the most recent change whose added content contains that line, then resolves the originating prompt from the transcripts historian preserves, falling back to the live transcript. The query makes no model call.
  4. Bash records say how far to trust them: whether the captured content is exactly this change or includes earlier uncommitted work, and a change that predates the command is recorded with unknown authorship.