본문으로 건너뛰기
AI NEWS JOURNAL
Hacker News Show HNAI NEWS / JOURNAL

Show HN: Git blame for AI code, down to the agent session

Article URL: https://keepplain.com/blame Comments URL: https://news.ycombinator.com/item?id=50594433 Points: 1 # Comments: 0

번역 서비스가 일시 중지되어 원문을 표시합니다.

git blame for agent sessions git blame stops at a commit and a name, usually yours. KeepPlain follows the line to the Claude Code, Codex, Cursor, Pi or Antigravity session behind it and opens the turn: what you asked, what the agent tried first, why it changed. curl -fsSL https://keepplain.com/install.sh | sh # macOS and Linux irm https://keepplain.com/install.ps1 | iex # Windows, in PowerShell keepplain login keepplain enable Free for personal use. Say yes when keepplain enable asks about git hooks: they add the session’s id to your commits, and blame follows it. On Windows you can also get it from the Microsoft Store. What leaves your computer Plugin on GitHub $ keepplain blame -L 35,47 src/auth/login.ts no session found 35 │ // Five tries a minute, then a cool-down. ● Cursor · Scaffold the auth module 36 │ export const LOGIN_WINDOW = 60; 37 │ 38 │ export const loginLimit = RateLimiter.for('login', (req) => { no session found 39 │ if (req.isInternal()) return Limit.none(); 40 │ ○ Codex · Audit log for auth 41 │ audit('login.throttle', req); ● Claude Code · Rate-limit the login… 42 │ return Limit.perMinute(5).by(req.input('email')); ● Cursor · Scaffold the auth module 43 │ }); Git says who changed it. It can’t say why. Ask your agent about a line, and it follows git to the session that made the change, reads the turns from your request to the commit, and answers with quotes. It says which turns it read and how the session was found. > why is line 42 of src/auth/login.ts keyed by account? Deliberate. On Sep 30 the agent first keyed the limit by IP, and 2 of 41 tests failed: behind the load balancer every user shares one address. You said: “Behind the load balancer everyone has the same IP. Key it by the account.” It switched the key to the email being signed in to and committed a3f9e1c. quoted from turns 112–115 of your Claude Code session What your agent answers, in any of the five agents. Ask in plain words. No new command to learn. When a prompt asks where code came from, the plugin adds one line to it: git shows what changed, the session the change was made in shows why. So the agent runs git log or git blame first, then asks KeepPlain for the session by the commit, its trailer, its subject and the files. The match is made on your computer; the prompt goes nowhere. > why is line 42 of src/auth/login.ts keyed by account? > where did the retry loop in sync.ts come from? > why was commit e93b2aa made? > who added the lock in syncSeats, and why? > откуда взялся этот таймаут? Things people type. English and Russian both work. On the site, a link to a line gives its whole life. git blame shows the last commit. In your team’s search, a GitHub link ending in #L42 becomes the line’s history: the commit that added it, every commit that changed it, and the sessions behind each one. How team memory works https://github.com/acme/api/blob/main/src/auth/login.ts#L42 On the pull request, for teams. Switch it on for your team and the GitHub App keeps one comment on each pull request, updated as commits change: which commits came from a session, which were agent-assisted, and the session behind each. Off until a team owner turns it on. Session titles only in private repositories. In a public one the link opens the team’s page, for members. No prompt, no text, no file in the comment. How it works on pull requests keepplain bot · commented, edited 2 min ago Sessions behind this pull request. The commits that came from an agent session or with an agent’s help. How it follows a line No new version control and no IDE extension. The agent you already use runs git, then asks KeepPlain. The line’s whole history git blame names only the last commit. Your agent asks git for every commit that touched the line, up to eight. $ git log -L 42,42:src/auth/login.ts -s --date=short \ --format='%h %ad %s %(trailers:key=Agent-Session,valueonly)' a3f9e1c 2026-09-30 Key login rate limit by account 7c21e0b4-… 6d12f9a 2026-09-15 Tighten login limit 1b07c44 2026-09-02 Add login throttle 91e5aa20-… Three commits touched line 42. Two of them name the session they came from. The commit names its session One trailer line in the commit message, written by KeepPlain’s prepare-commit-msg hook when a commit holds a session’s work. Only the id travels with your push. The session doesn’t. $ git show -s --format=%B a3f9e1c Key login rate limit by account Agent-Session: 7c21e0b4-2f6e-4a1d-9c3b-58e0f1d2a7b9 KeepPlain finds the session By the commit, the trailer, the subject and the files, across your sessions from all five agents, and your team’s. search_my_work commit a3f9e1c agent_sessions 7c21e0b4-… subject "Key login rate limit by account" paths src/auth/login.ts → Claude Code · “Rate-limit the login endpoint” · Sep 30 found_by commit own true cursor turn 115 changed src/auth/login.ts, made a3f9e1c request turn 112 “Behind the load balancer everyone has…” It reads the turns From your request to the change: the reasoning and your decision, not the whole log. The request is your last real one before the change; a “yes” or “continue” is skipped. get_session_excerpt turns 109–115 109 agent Keying the limiter by IP, the usual default. 110 tests ✕ 2 of 41 failed · users behind one proxy are blocked together 112 you “Behind the load balancer everyone has the same IP. Key it by the account.” 115 agent changed src/auth/login.ts:42 · committed a3f9e1c Your agent answers, with quotes The answer above: what happened, your words, the commit, and which turns it came from. If the session was found another way, by its edits or not at all, the answer says that too. When the trail goes cold, it says so The answer tells you how the session was found. Or that it wasn’t. Found by its commit The commit says which session it came from. The answer quotes that session and the turns it read. Found by its edits No trailer? KeepPlain takes the agent’s last edits of those files before the commit, and the answer says it was found that way, not by the commit. A teammate’s session You get whose session it is and its page. The conversation stays with its author until they share it. No agent session found The change wasn’t made in a synced session you can read. Your agent says so instead of inventing a reason. What leaves your computer Git runs on your computer and the code stays there. What the site gets The file’s path and its commits: hash, the file’s name in each, title, Agent-Session trailer, dates. The newest 300 commits of a file, a hundred a request. Never the code. What comes back The sessions you may read. A teammate’s session you see in the team’s list but may not read is named by its author only. Signed out A trailer that names a session the site doesn’t hold is looked for on this computer, and nothing of it goes anywhere. Not signed in, that is all you get, with the commits’ titles for the rest. The git hooks Only in a repository where you said yes to keepplain enable, never globally. The session id becomes part of the repository’s history: in a public repository everyone sees it. keepplain disable takes the hooks out; trailers already in commits stay. -L from,to blames those lines, --rev=commit the file as it was there, -w ignores whitespace, --json is for scripts and the desktop app. Read the code The plugin is MIT. Its README describes the command, and the table under “What leaves your machine” lists every call. Measured, not promised “why” questions answered with the session that made the change median answer to a “why” Claude Code, Codex, Cursor, Pi and Antigravity of past sessions KeepPlain offers to bring in when you install Measured in production on Oct 14, 2026: 34 questions the founder asked about their own work, 6 of them “why”, across 391 sessions. For 31 of the 34 the right session came first. One person’s history, not a benchmark. Next time, ask why. curl -fsSL https://keepplain.com/install.sh | sh # macOS and Linux irm https://keepplain.com/install.ps1 | iex # Windows, in PowerShell keepplain login keepplain enable Then keepplain login and keepplain enable, with a yes to git hooks for the trailer. Blame a file: keepplain blame . On Windows you can also get it from the Microsoft Store. Questions and problems: [email protected] More in KeepPlain For you Free Why a line changedYou are here Memory across agentsYour agent finds what you already solved and picks the task up in any agent. Handoff at the limitNear your Claude limit, carry on in Codex or Pi with a brief built on your machine. Rules from your correctionsCorrect it in two conversations, add the rule, and every agent you use reads it. Sessions in two minutesHours of agent work cut to the moments that mattered, with the code of each turn. Private by defaultSecrets removed on your machine. Nothing published until you say so. For your team Per active seat Team rules, reviewedRules your team reviews like a pull request reach every agent on the team. Team memoryAgents search the team’s sessions first, and the work stays when people leave. Sessions on pull requestsEvery pull request shows which commits came from a session, and links it. InsightsWhere agent time goes, what got merged, and at what cost. For everyone Free The session libraryReal sessions by stack and task, including where agents went wrong. MCP for your agentBefore a task, or when it’s stuck, your agent checks how others got past it. Skills from sessionsTurn a session that worked into a skill, a rule or a prompt. Compare runsTwo to four runs of one prompt side by side, on one clock. Share how you built itPut the session behind a pull request or a README, at the detail you choose.

자료 출처

원문 읽기 ↗

관련 주제

← 전체 소식 이어 읽기