Inspiration

Students and job candidates use AI assistants for coursework and take-home tasks now, and the person marking it still only sees the final code. Good code can come from someone who caught every mistake the AI made, or from someone who pressed enter forty times. The usual answers are to ban AI, which is hard to enforce, or to ignore it. I wanted something in between, where the candidate hands in how they worked next to what they made.

What it does

A candidate runs one command in the repo they built with Claude Code. AiLogger reads the Claude Code session logs for that folder and the git history, and writes a single JSON report with every prompt, how the AI answered, each file the AI edited, which lines in the final code came from the AI, which they wrote or changed by hand, and the moments they pushed back. Tokens, emails, home folder paths and anything else they name are hidden before the file is written.

The reviewer drops the report into the viewer. The first screen is one sentence and one bar. It says how many prompts there were, how much of the new code came from the AI and how much was written by hand, and how often the candidate corrected the AI, turned down an edit or stopped it. Under that are the steering moments in the candidate's own words, the full prompt timeline with commits in between, and every file line by line, coloured by where each line came from.

How I built it

The CLI is TypeScript on Node with no runtime dependencies, run with npx straight from the GitLab repo. It parses the Claude Code JSONL format, pairs each Edit, Write and MultiEdit call with its result so failed and turned-down edits are not counted, and leaves out the context lines Claude repeats inside an edit. It then compares the final files against the last commit before the first session to split lines into AI, by hand and already there.

The viewer is a Next.js app on Vercel with no backend. Reports are parsed in the browser, so a candidate's code never touches a server unless they host the file themselves.

The demo report

AiLogger's own receipt: built by an AI agent from one written brief. I wrote the brief, and Claude Code built the CLI and the viewer in one session with no further prompts, so the demo has one prompt and no steering moments. About a fifth of the lines show as by hand, and those were written by the agent too, through shell commands it ran to copy, split and configure files. The logs record those as commands rather than edits, and I left them as they are so the demo shows the tool's real limit. The brief and the agent's final reply are summarised in the demo because the originals named other projects.

Challenges

Line origin is harder than it looks. Claude's edits repeat surrounding lines, formatters rewrite AI lines, and scaffolders write files through shell commands that never show up as edits. I went for a simple rule that a reviewer can understand and check, and the report says plainly where it can be wrong.

The report is self-reported, and I could not change that without a server watching the candidate work. So the README and the viewer both say a candidate can edit it and it should be read like a written reflection, and the design leans on the parts that are hard to fake well, like a long timeline of real prompts and corrections.

Accomplishments

One command for the candidate, one drop for the reviewer, and a first screen that tells a busy teacher how the person worked in a few seconds.

What I learned

The interesting signal is rarely the percentage of AI code. It is the steering, when the candidate says "no, keep it in one file" or stops the AI mid-answer, because that is where you see them think.

What's next

  • Assessments with a code, so a teacher or recruiter can collect every candidate's report in one list.
  • Support for other assistants' logs.
  • A signed mode where the logs are captured as the candidate works, to make editing harder.

Built With

Share this project:

Updates

Submission history