How it works Hooks, git notes, the open standard Toolkit Live · Burndown · Menubar · CLI Roadmap Now · Next · Later · Exploring Pair with Microsoft Copilot The outcome layer for your Copilot Power BI Compare vs git-ai, DX, LinearB, Faros Whitepaper A framework for AI code observability Pricing

HOW IT WORKS

No magic. Just hooks, git, and standards.

We don't read your code. We don't run AI to detect AI. We use hooks the agents already provide and we use git itself as the database.

The naive approach

"Use a model to detect AI-generated code from the diff."

It doesn't work. Detection accuracy hovers around 60%. False positives. False negatives. And once a developer touches the AI code, the signal is gone. We don't detect. The agent itself reports.

The complete flow

From Claude editing a file to your dashboard

1

The agent fires a PreToolUse hook

Before Claude Code (or Cursor, Codex, Windsurf) edits a file, it calls a registered hook with the tool name and target file. We capture a snapshot.

# ~/.claude/settings.json
"PreToolUse": [{ "command": "obsly-ai ai-checkpoint claude-code" }]
2

The agent edits the file

Normal Claude/Cursor behavior. Nothing intercepted. The user accepts or rejects in their normal flow.

3

PostToolUse fires — we diff

The agent calls the post-hook. We compare snapshot vs current. The new lines are AI's. The unchanged ones are human's. We attribute, we don't guess.

# lines 5-18 are now attributed to:
claude-code/claude-sonnet-4-6 (session abc123)
4

Append to the working log

Attribution gets stored in .git/ai/working_logs/{base_commit}.jsonl. Append-only, file-locked, safe under concurrent edits.

5

git commit triggers post-commit hook

Our git post-commit hook reads the working log, builds an Authorship Log, and stores it as a git note under refs/notes/ai.

# view the note for any commit
git notes --ref=ai show HEAD
6

Local CLI works immediately

No network needed. obsly-ai blame foo.py reads the git note and shows attribution.

# for individual developers, this is enough
obsly-ai blame src/auth.py
obsly-ai stats --durability
7

Optional: push to your team dashboard

If your org uses Obsly AI cloud, the post-commit hook also POSTs the note to your tenant. Or you install our GitHub App and we read the notes via GitHub API on push events.

8

Three views of the same data

Personal (private to the dev), Vendor (the team/org), Enterprise (a buyer comparing multiple vendors). Same git notes underneath. Different lenses on top.

What the data looks like

A single file, attributed line by line. Multiplied by every commit, every repo, every vendor.

src/auth.py — Vendor A / payments-core
78% written by AI · 35 lines
1importos
2importhmac
3fromdatetimeimportdatetime
4
5claude-codeclass AuthManager:
6 """Handle authentication lifecycle."""
7 def __init__(self, db):
8 self.db = db
9 self.cache = {}
10 def create_token(self, user_id):
11 return jwt.encode({"sub": user_id}, SECRET)
12
13 def authenticate(self, email, pwd):
14user =self.db.get_user(email)
15 if notuser:raiseHTTPException(401)
16cursor def validate_token(self, tok):
17 try: returnjwt.decode(tok, SECRET)
18 exceptJWTError:return None
claude-code · 7 lines cursor · 3 lines human · 8 lines Aggregated upward — this is what the dashboards run on.

Architecture

Local-first, cloud-optional

DEVELOPER'S MACHINE AI agents Claude Code Cursor Codex Windsurf PreToolUse PostToolUse obsly-ai CLI Python · stdlib only computes diff attributes lines .git/ai/working_logs/ JSONL + flock (concurrent-safe) git commit refs/notes/ai · git-ai v3.0.0 git push (notes only) OBSLY AI CLOUD · OPTIONAL GitHub App obsly-ai-code-metrics webhook receiver fetches Postgres orgs · repos commits · blame 3 Dashboards Enterprise Vendor Personal FastAPI + Jinja2 · Server-rendered · No SPA Source code never leaves the developer's machine. Only metadata.

Things you might be wondering

Do you read my source code?

No. The CLI reads files locally to compute diffs, but only line metadata (number, agent, model) leaves your machine — never the content. The cloud only stores attribution metadata, not source.

What if the agent doesn't fire hooks?

We support Claude Code, Cursor, Codex, Windsurf via official hooks. If an agent doesn't fire a hook, that edit is treated as human. We don't try to detect after the fact.

What happens if I rebase or amend?

Our post-rewrite hook updates the git notes to follow the new commit SHAs. Attribution survives rebase, amend, and cherry-pick. Force-push is the only thing that can break it.

What if a human edits an AI-generated line?

That line gets re-attributed to the human. We track who currently owns each line, not history. The "durability" metric measures exactly this: how much AI code stays AI-owned over time.

Is the git note format proprietary?

No. We use the open git-ai standard v3.0.0. Your notes are portable to any tool that reads the same format. If you stop using Obsly AI, your data leaves with you.

Hook latency — does this slow me down?

Hook cycle is sub-100ms for normal files. The CLI is Python stdlib only — no heavy imports, no network calls, no LLM in the path. We measured.

Try it.

Two commands. No account needed for the CLI.

$ pipx install obsly-ai
$ obsly-ai install
Get started